home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 9 / The PC-SIG Library on CD ROM - Ninth Edition.iso / 2301_400 / DISK2314 / DISK2314.ZIP / LE_C.ZIP / LE_C.MAN < prev    next >
Text File  |  1990-03-07  |  109KB  |  3,944 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                               LE_C Library Functions
  16.                                    Version 1.0
  17.  
  18.  
  19.                                  Reference Manual
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                                         By
  51.                       ProBATE Software Publishing Co., Inc.
  52.                           3527 West 12th Street, Suite B
  53.                                 Greeley, CO  80634
  54.                                   (303) 352-3445
  55.  
  56.  
  57.            Copyright (c) 1990 By ProBATE Software Publishing Co., Inc.
  58.                                All Rights Reserved
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                 License Agreement
  65.  
  66.      The LE_C  Library is  protected by  United States Copyright  Law.   All
  67.      rights are  reserved by  ProBATE Software  Publishing Co.,  Inc.   Non-
  68.      registered users  of LE_C  are licensed only  to use  the program  on a
  69.      trial basis for the sole purpose of determining whether or not it meets
  70.      their requirements.  All other use requires registration.
  71.  
  72.      Any other use of non-registered copies of LE_C by any person, business,
  73.      corporation,  or  any  other entity  is  strictly  forbidden  and is  a
  74.      violation of this license agreement.
  75.  
  76.      Registered users are  licensed to use the LE_C  Library on one computer
  77.      only.
  78.  
  79.      All users are  granted a limited license to copy LE_C Library for trial
  80.      use of others, with the following conditions:
  81.  
  82.        LE_C Library must be distributed in unmodified, complete
  83.        form, including the manual, and license agreement.
  84.  
  85.        No fee, other than a disk duplicating fee, not to
  86.        exceed, $6.00, may be charged for LE_C Library.
  87.  
  88.      ProBATE  Software  Publishing Co.,  Inc.  grants, to  registered owners
  89.      only, a  royalty-free right  to reproduce and  distribute the  run-time
  90.      routines provided they are distributed only  in conjunction with and as
  91.      part of a software product.
  92.  
  93.  
  94.  
  95.  
  96.                                      Warranty
  97.  
  98.      Disclaimer of Warranties
  99.  
  100.      ProBATE Software  Publishing Co., Inc. makes LE_C Library available "as
  101.      is" and  is not  making any warranties  of any  kind including  but not
  102.      limited to implied  warranties of merchantability  or of fitness for  a
  103.      particular purpose.   ProBATE Software  Publishing Co.,  Inc. does  not
  104.      guarantee the accuracy,  adequacy, or  completeness of the  information
  105.      contained  in  the  software  and   documentation.    ProBATE  Software
  106.      Publishing Co., Inc.  does not accept liability for any  loss or damage
  107.      resulting  from the use  of this software  and documentation, including
  108.      direct, indirect, consequential, or special damage.
  109.  
  110.      Choice of Law
  111.      The rights and obligations of you  and ProBATE Software Publishing Co.,
  112.      Inc. with respect to  the LE_C Library shall be governed by the laws of
  113.      the state of Colorado and, where applicable, of the United States.
  114.  
  115.  
  116.  
  117.  
  118.                                    Registration
  119.  
  120.      Registration  entitles  you  to   use  the  LE_C  Library  1.0.     Any
  121.      unregistered use  other than trial use to determine if LE_C meets yours
  122.      needs  is  a  violation  of  the  license  agreement  and  is  strictly
  123.      forbidden.
  124.  
  125.      Single user registration is available for  $30.00 per copy.  Registered
  126.      users  will receive  the most  current version of  LE_C Library.   This
  127.      includes the complete C source code.  Registration also entitles you to
  128.      discounts on future products.
  129.  
  130.      The LE_C license authorizes  the use of one copy of LE_C for use on one
  131.      computer only.  If  you have multiple computers, either  standalone, or
  132.      networked, you must register one  copy of LE_C for each  workstation on
  133.      which LE_C will be used. 
  134.  
  135.  
  136.  
  137.                       ProBATE Software Publishing Co., Inc.
  138.                           3527 West 12th Street, Suite B
  139.                                 Greeley, CO  80634
  140.                                   (303) 352-3445
  141.  
  142.                  Quantity      Unit Price    Extended Price
  143.  
  144.                  ________        $30.00      ______________
  145.  
  146.  
  147.           Colorado Residents Add 3% Tax      ______________
  148.  
  149.  
  150.                                   Total      ______________
  151.  
  152.      Name: _____________________________________________________
  153.  
  154.      Company: __________________________________________________
  155.  
  156.      Address: __________________________________________________
  157.  
  158.      City: _____________________________________________________
  159.  
  160.      Phone: ____________________________________________________
  161.  
  162.      Check #:  _________________________________________________
  163.  
  164.      VISA/MC# ________________________________  Exp. ___________
  165.       
  166.      Card Holder's Name: _______________________________________
  167.                                 
  168.      Card Holder's Signature:  _________________________________
  169.  
  170.  
  171.              CALL 1-800-288-9169 or 1-303-352-3445 to Order by Phone
  172.  
  173.  
  174.  
  175.  
  176.                                 Table of Contents
  177.  
  178.      Introduction . . . . . . . . . . . . . . . . . . . . . . . .   1
  179.      Miscellaneous  . . . . . . . . . . . . . . . . . . . . . . .   2
  180.         Video Modes . . . . . . . . . . . . . . . . . . . . . . .   2
  181.         Screen Coordinates  . . . . . . . . . . . . . . . . . . .   2
  182.         LE_C Library Object Files . . . . . . . . . . . . . . . .   2
  183.         LE_C Help Facility  . . . . . . . . . . . . . . . . . . .   2
  184.      Constants  . . . . . . . . . . . . . . . . . . . . . . . . .   3
  185.      Structures . . . . . . . . . . . . . . . . . . . . . . . . .   4
  186.         fkey  . . . . . . . . . . . . . . . . . . . . . . . . . .   4
  187.         item_struct . . . . . . . . . . . . . . . . . . . . . . .   4
  188.         BMENU . . . . . . . . . . . . . . . . . . . . . . . . . .   4
  189.         BMENU_ITEMS . . . . . . . . . . . . . . . . . . . . . . .   5
  190.         BOX_MENU  . . . . . . . . . . . . . . . . . . . . . . . .   5
  191.      Globals  . . . . . . . . . . . . . . . . . . . . . . . . . .   6
  192.         _le_help_page . . . . . . . . . . . . . . . . . . . . . .   6
  193.         _le_help_load_sw  . . . . . . . . . . . . . . . . . . . .   6
  194.         _le_help_file . . . . . . . . . . . . . . . . . . . . . .   6
  195.         _le_help_row  . . . . . . . . . . . . . . . . . . . . . .   6
  196.         _le_help_col  . . . . . . . . . . . . . . . . . . . . . .   6
  197.         _le_help_width  . . . . . . . . . . . . . . . . . . . . .   6
  198.         _le_help_move_sw  . . . . . . . . . . . . . . . . . . . .   6
  199.         _le_help_reset_clr  . . . . . . . . . . . . . . . . . . .   7
  200.         _le_help_clr  . . . . . . . . . . . . . . . . . . . . . .   7
  201.         _le_help_explode_sw . . . . . . . . . . . . . . . . . . .   7
  202.         _le_help_box_type . . . . . . . . . . . . . . . . . . . .   7
  203.         _le_clr_in  . . . . . . . . . . . . . . . . . . . . . . .   7
  204.         _le_clr_out . . . . . . . . . . . . . . . . . . . . . . .   7
  205.         _le_toggle_key1 . . . . . . . . . . . . . . . . . . . . .   7
  206.         _le_toggle_key2 . . . . . . . . . . . . . . . . . . . . .   8
  207.         _le_skey[]  . . . . . . . . . . . . . . . . . . . . . . .   8
  208.         _le_bmenu_bar_clr . . . . . . . . . . . . . . . . . . . .   8
  209.         _le_bmenu_clr . . . . . . . . . . . . . . . . . . . . . .   8
  210.         _le_bmenu_act_clr . . . . . . . . . . . . . . . . . . . .   8
  211.         _le_bmenu_norm_act_clr  . . . . . . . . . . . . . . . . .   8
  212.         _le_bmenu_shadow  . . . . . . . . . . . . . . . . . . . .   8
  213.         _le_bmenu_hot_sw  . . . . . . . . . . . . . . . . . . . .   9
  214.         _le_bmenu_width . . . . . . . . . . . . . . . . . . . . .   9
  215.         _le_bmenu_rows  . . . . . . . . . . . . . . . . . . . . .   9
  216.      Functions  . . . . . . . . . . . . . . . . . . . . . . . . .  10
  217.         le_date.c functions . . . . . . . . . . . . . . . . . . .  10
  218.            le_get_date  . . . . . . . . . . . . . . . . . . . . .  10
  219.         le_dbl.c functions  . . . . . . . . . . . . . . . . . . .  12
  220.            le_get_double  . . . . . . . . . . . . . . . . . . . .  12
  221.            le_format_double . . . . . . . . . . . . . . . . . . .  13
  222.            le_round_double  . . . . . . . . . . . . . . . . . . .  14
  223.         le_help.c functions . . . . . . . . . . . . . . . . . . .  15
  224.            le_read_help . . . . . . . . . . . . . . . . . . . . .  15
  225.            le_help  . . . . . . . . . . . . . . . . . . . . . . .  15
  226.         le_init.c functions . . . . . . . . . . . . . . . . . . .  17
  227.            le_init_field  . . . . . . . . . . . . . . . . . . . .  17
  228.         le_inpt.c functions . . . . . . . . . . . . . . . . . . .  18
  229.            le_input . . . . . . . . . . . . . . . . . . . . . . .  18
  230.  
  231.  
  232.  
  233.  
  234.  
  235.                                 Table of Contents
  236.  
  237.         le_item.c functions . . . . . . . . . . . . . . . . . . .  21
  238.            le_item_switch . . . . . . . . . . . . . . . . . . . .  21
  239.         le_key.c functions  . . . . . . . . . . . . . . . . . . .  23
  240.            le_get_key . . . . . . . . . . . . . . . . . . . . . .  23
  241.         le_long.c functions . . . . . . . . . . . . . . . . . . .  24
  242.            le_get_long  . . . . . . . . . . . . . . . . . . . . .  24
  243.            le_format_long . . . . . . . . . . . . . . . . . . . .  25
  244.         le_menu.c functions . . . . . . . . . . . . . . . . . . .  26
  245.            le_bmenu . . . . . . . . . . . . . . . . . . . . . . .  26
  246.            le_box_menu  . . . . . . . . . . . . . . . . . . . . .  28
  247.         le_misc.c functions . . . . . . . . . . . . . . . . . . .  30
  248.            le_goto_xy . . . . . . . . . . . . . . . . . . . . . .  30
  249.            le_scroll_up . . . . . . . . . . . . . . . . . . . . .  31
  250.            le_scroll_down . . . . . . . . . . . . . . . . . . . .  31
  251.            le_size_cursor . . . . . . . . . . . . . . . . . . . .  33
  252.         le_save.c functions . . . . . . . . . . . . . . . . . . .  34
  253.            le_build_buffers . . . . . . . . . . . . . . . . . . .  34
  254.            le_save_block  . . . . . . . . . . . . . . . . . . . .  35       
  255.            le_restore_block . . . . . . . . . . . . . . . . . . .  35
  256.            le_save_scrn . . . . . . . . . . . . . . . . . . . . .  37
  257.            le_restore_scrn  . . . . . . . . . . . . . . . . . . .  37
  258.         le_strng.c functions  . . . . . . . . . . . . . . . . . .  39
  259.            le_get_multln  . . . . . . . . . . . . . . . . . . . .  39
  260.            le_get_string  . . . . . . . . . . . . . . . . . . . .  40
  261.         le_util.c functions . . . . . . . . . . . . . . . . . . .  41
  262.            le_display_error . . . . . . . . . . . . . . . . . . .  41
  263.            le_fright_zero . . . . . . . . . . . . . . . . . . . .  42
  264.            le_fudge_factor  . . . . . . . . . . . . . . . . . . .  43
  265.            le_wait  . . . . . . . . . . . . . . . . . . . . . . .  43
  266.            le_init_fkey_struct  . . . . . . . . . . . . . . . . .  44
  267.            le_is_dos_legal  . . . . . . . . . . . . . . . . . . .  45
  268.            le_locate_file . . . . . . . . . . . . . . . . . . . .  46
  269.            le_long_to_date  . . . . . . . . . . . . . . . . . . .  47
  270.            le_severe_error  . . . . . . . . . . . . . . . . . . .  48
  271.            le_system_date . . . . . . . . . . . . . . . . . . . .  49
  272.            le_verify_date . . . . . . . . . . . . . . . . . . . .  50
  273.            le_word_wrap . . . . . . . . . . . . . . . . . . . . .  51
  274.         le_vid.c functions  . . . . . . . . . . . . . . . . . . .  52
  275.            le_set_video_mem . . . . . . . . . . . . . . . . . . .  52
  276.            le_video_mode  . . . . . . . . . . . . . . . . . . . .  53
  277.         le_write.c functions  . . . . . . . . . . . . . . . . . .  54
  278.            le_clear_block . . . . . . . . . . . . . . . . . . . .  54
  279.            le_cls . . . . . . . . . . . . . . . . . . . . . . . .  55
  280.            le_draw_border . . . . . . . . . . . . . . . . . . . .  56
  281.            le_draw_hline  . . . . . . . . . . . . . . . . . . . .  57
  282.            le_draw_vline  . . . . . . . . . . . . . . . . . . . .  58
  283.            le_fill_block  . . . . . . . . . . . . . . . . . . . .  59
  284.            le_rewrite_scrn  . . . . . . . . . . . . . . . . . . .  60
  285.            le_write_char  . . . . . . . . . . . . . . . . . . . .  61
  286.            le_write_string  . . . . . . . . . . . . . . . . . . .  62
  287.            le_write_far_string  . . . . . . . . . . . . . . . . .  63
  288.  
  289.  
  290.  
  291.  
  292.                                                                 Introduction
  293.      -----------------------------------------------------------------------
  294.  
  295.                                    Introduction
  296.  
  297.      The LE_C  Library is a comprehensive  set of C run-time  functions that
  298.      allows you to  easily create  programs that implement  many of  today's
  299.      standard user interfaces.  LE_C contains routines for menus, box menus,
  300.      data entry, help facility, border  drawing (including exploding boxes),
  301.      line drawing, and  much, much more.   Most of the LE_C  functions write
  302.      directly to the video memory page -- giving you fast screens.
  303.  
  304.      What makes LE_C unique is its integrated help facility functions.  LE_C
  305.      allows  you to  create a very  useful help  facility with a  minimum of
  306.      fuss.   All  of the  menu  and input  functions  of LE_C  support  help
  307.      screens.  In addition, you can specify help screens unique to each menu
  308.      selection.   Plus,  LE_C will allow  the user  to move the  help window
  309.      within the screen.
  310.  
  311.      LE_C also allows  you to specify up  to 40 special function  keys (e.g.
  312.      Ctrl-F1, Ctrl-End, etc.)  for use  with the menu  and input  functions.
  313.      These 40 keys are in addition to the pre-defined commonly used function
  314.      keys.
  315.  
  316.      Extra Bonus!  All  registered users will  receive the screen painter  &
  317.      code generator.   The  screen painter  & code generator  allows you  to
  318.      create  screens complete with boxes and lines.   This utility will then
  319.      generate LE_C function calls for the desired screen.
  320.  
  321.      The LE_C library functions were developed  using QuickC Version 2.0 and
  322.      should be compatible with Microsoft C.
  323.  
  324.      We hope  you enjoy  using these functions  as much  as we  had creating
  325.      them.  If you have any suggestions, please call or write us.
  326.  
  327.      Thank You.  We look forward to your registration.
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.      QuickC   and  Microsoft   are   registered   trademarks  of   Microsoft
  339.      Corporation.
  340.  
  341.  
  342.  
  343.      ----------------------------------------------------------------------
  344.      LE_C Library (c) Copyright 1990 By ProBATE Software
  345.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 1
  346.  
  347.  
  348.  
  349.  
  350.                                                                Miscellaneous
  351.      -----------------------------------------------------------------------
  352.  
  353.                                   Miscellaneous
  354.  
  355.      Since many of  the LE_C functions write directly to  video memory, your
  356.      video must be  in one of the  three text modes (2,  3, or 7).   If LE_C
  357.      detects any  mode other than 2, 3, or 7,  it will display a message and
  358.      immediately terminate the program.
  359.  
  360.      The screen coordinates  for displaying strings, boxes,  lines, etc. are
  361.      absolute screen values.  That  is, the upper left corner is 0,0 and the
  362.      lower right corner is 24,79.  Other values will  result in unsuccessful
  363.      function calls.
  364.  
  365.      The LE_C functions are divided into several object modules
  366.      that perform various functions.  These modules are the following:
  367.  
  368.        Object File      Description
  369.        ------------     -----------------------------------------
  370.        le_date.obj      date input function
  371.        le_dbl.obj       double value input/format functions
  372.        le_glob.obj      global variable declarations 
  373.        le_help.obj      LE_C help facility functions  
  374.        le_init.obj      field initialization function
  375.        le_item.obj      item switch input function
  376.        le_key.obj       key input function
  377.        le_long.obj      long value input/format functions
  378.        le_menu.obj      bar and box menu functions
  379.        le_misc.obj      screen scrolling and cursor functions
  380.        le_save.obj      screen saving/restoring functions
  381.        le_skey.obj      special function key function
  382.        le_strng.obj     string and multi-line input functions
  383.        le_util.obj      miscellaneous utility functions
  384.        le_vid.obj       video mode functions
  385.        le_write.obj     screen functions
  386.  
  387.      The LE_C library functions  were compiled, linked, and tested  with the
  388.      medium model of the QuickC version 2.0 compiler.
  389.  
  390.      The le_c.hlp file contains your help screens.  Each reference to a help
  391.      page  in  your programs  via  LE_C  menus and/or  input  functions must
  392.      contain  a  corresponding help  page in  le_c.hlp.   The  help facility
  393.      should be in the following layout:
  394.         >1                   <-  Page #
  395.         This is help page number one.
  396.         This is line two of number one.
  397.         >2
  398.         This is help page number two...
  399.         <                    <-End of help facility
  400.  
  401.      ----------------------------------------------------------------------
  402.      LE_C Library (c) Copyright 1990 By ProBATE Software
  403.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 2
  404.  
  405.  
  406.  
  407.  
  408.                                                                    Constants
  409.      -----------------------------------------------------------------------
  410.  
  411.                                   LE_C Constants
  412.  
  413.      The following  is a list of the commonly  used constants defined in the
  414.      le_c.h header file.  Others not listed are self-explanatory.
  415.  
  416.      Box drawing and line drawing constants:
  417.        SINGLE_LINE 1
  418.        DOUBLE_LINE 2
  419.        SVER_DHOR 3     /* box: single vertical - double horizontal */
  420.        DVER_SHOR 4     /* box: double vertical - single horizontal */
  421.        SINGLE_ENDS 3   /* line: single ver/hor line with ends */
  422.        DOUBLE_ENDS 4   /* line: double ver/hor line with ends */
  423.  
  424.      Exploding box constants:
  425.        EXPLODE_ON  1
  426.        EXPLODE_OFF 0
  427.  
  428.      le_input() constants:
  429.        GET_DOUBLE 0
  430.        GET_LONG   1
  431.        GET_DATE   2
  432.        GET_ITEM   3
  433.        GET_MULTLN 4
  434.        GET_STRING 5
  435.  
  436.      le_restore_block() constants:
  437.        RESTORE_ONLY 1
  438.        FREE_ONLY    2
  439.        RESTORE_FREE 3
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.      ----------------------------------------------------------------------
  460.      LE_C Library (c) Copyright 1990 By ProBATE Software
  461.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 3
  462.  
  463.  
  464.  
  465.  
  466.                                                                   Structures
  467.      -----------------------------------------------------------------------
  468.  
  469.                                  LE_C Structures
  470.  
  471.      The following is a  brief explanation of various structures  defined by
  472.      LE_C.  The le_c.h header file contains more detailed information.
  473.  
  474.      fkey
  475.      This structure defines the function keys that cause one of the input or
  476.      menu functions to  return.  fkey is a bit-field structure with each key
  477.      holding  a  value of  either 0  or 1  (on/off). Supported  keys include
  478.      F1-F12, PgDn, PgUp, Up arrow, and Down arrow.
  479.  
  480.      Functions  requiring  the use  of the  fkey  structure will  return the
  481.      following values if the function key has been set to on (1).
  482.  
  483.         F1 - 1, unless there is help available
  484.         F2 - 2
  485.         F3 - 3
  486.         F4 - 4
  487.         F5 - 5
  488.         F6 - 6
  489.         F7 - 7
  490.         F8 - 8
  491.         F9 - 9
  492.         F10 - 10
  493.         F11 - 11
  494.         F12 - 12
  495.         Up arrow - (-1)
  496.         Down arrow - (-2)
  497.         PgUp - (-3)
  498.         PgDn - (-4)
  499.  
  500.      item_struct
  501.      This  structure defines  the row,  column,  width, number  of items,and
  502.      current position for a call to the le_item_switch() function.
  503.  
  504.      le_input
  505.      This structure defines  the fields for  use in the le_input()  function
  506.      call.    Please see  the  description  of the  le_input()  function for
  507.      detailed use of this structure.
  508.  
  509.      BMENU
  510.      This structure contains information about the  bar menu to be displayed
  511.      by  the le_bmenu()  function.   It  contains  a pointer  to the  title,
  512.      row/col,  current  position,  number  items,  box type,  exploding  box
  513.      switch, and a page of the  help facility.  The row/col is the  position
  514.      of the first selection.
  515.  
  516.  
  517.      ----------------------------------------------------------------------
  518.      LE_C Library (c) Copyright 1990 By ProBATE Software
  519.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 4
  520.  
  521.  
  522.  
  523.  
  524.                                                                   Structures
  525.      -----------------------------------------------------------------------
  526.  
  527.      BMENU_ITEMS
  528.      This structure defines  the bar menu items for a call to the le_bmenu()
  529.      function.  It contains a pointer to the item, its hot key position, and
  530.      page of the help facility.
  531.  
  532.      BOX_MENU
  533.      This  structure  contains  information about  a  box  menu  type to  be
  534.      displayed by  the le_box_menu() function.   It contains  three optional
  535.      pointers to messages, current menu  selection position, row/col, number
  536.      of items, exploding box switch, and a  page of the help facility.   The
  537.      row/col is the position of the first selection.
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.      ----------------------------------------------------------------------
  576.      LE_C Library (c) Copyright 1990 By ProBATE Software
  577.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 5
  578.  
  579.  
  580.  
  581.  
  582.                                                                      Globals
  583.      -----------------------------------------------------------------------
  584.  
  585.                                    LE_C Globals
  586.  
  587.      le_help.c globals
  588.  
  589.      _le_help_page[]
  590.      This  variable is  a table  of long integers  that contains  the offset
  591.      address of each help page.   The number of help pages is set  to 200 by
  592.      LE_HELP_PAGES.  It  is recommended that you do not change the number of
  593.      pages since le_help.c was compiled using 200.
  594.  
  595.      _le_help_load_sw
  596.      This variable indicates as to whether or not the help facility has been
  597.      read  by  le_read_help().     The  switch   is  automatically  set   by
  598.      le_read_help() after the _le_help_page[] table has been filled.
  599.  
  600.      _le_help_file[]
  601.      This  is the  file  name of  the help  facility  file.   It  is set  to
  602.      "le_c.hlp".  If you wish to change the name of the  help facility file,
  603.      use the strcpy() function.  It is assumed that the help file is located
  604.      in the current directory. 
  605.  
  606.      _le_help_row
  607.      This variable indicates the  starting row position of the  help window.
  608.      The default  is absolute row 4.  If the _le_help_move_sw is set and the
  609.      help screen has  been moved by the user, _le_help_row  will contain the
  610.      current setting. 
  611.  
  612.      _le_help_col
  613.      This  variable  indicates  the starting  column  position  of  the help
  614.      window.  The default is absolute column 19.  If the _le_help_move_sw is
  615.      set and the help  screen has been moved by the  user, _le_help_col will
  616.      contain the current setting.
  617.  
  618.      _le_help_width
  619.      This variable contains the width of the help screen.  The default width
  620.      is 40.
  621.  
  622.      _le_help_move_sw
  623.      This switch  indicates as to whether or not the  user may move the help
  624.      window somewhere else on  the screen with the arrow keys.   The default
  625.      is ON (1).
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.      ----------------------------------------------------------------------
  634.      LE_C Library (c) Copyright 1990 By ProBATE Software
  635.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 6
  636.  
  637.  
  638.  
  639.  
  640.                                                                      Globals
  641.      -----------------------------------------------------------------------
  642.  
  643.      _le_help_reset_clr
  644.      This variable contains the  color to reset the background  screen prior
  645.      to displaying the help  screen.  The default is 0.  If a non-zero value
  646.      is used,  that  value will  be  used  in a  le_rewrite_scrn()  call  in
  647.      le_help().   Since le_help() automatically  saves the  screen, it  will
  648.      automatically be restored on exit.  The default is 0.
  649.  
  650.      _le_help_clr
  651.      This variable contains the help screen color.  The default is 112.
  652.  
  653.      _le_help_explode_sw
  654.      This  switch indicates  as to whether  the help screen  is an exploding
  655.      box.   Valid values  are EXPLODE_ON  and EXPLODE_OFF.   The default  is
  656.      EXPLODE_ON.  If  you use exploding boxes  and help screens, be  sure to
  657.      call le_fudge_factor() during  program initialization.
  658.  
  659.      _le_help_box_type;
  660.      This variable  indicates the type of box to  use when creating the help
  661.      window.    Valid values  are  SINGLE_LINE, DOUBLE_LINE,  SVER_DHOR, and
  662.      DVER_SHOR. The default is DOUBLE_LINE. 
  663.  
  664.      le_input.c globals
  665.  
  666.      _le_clr_in
  667.      This variable indicates the color to be used during input.  The default
  668.      is 12.
  669.  
  670.      _le_clr_out
  671.      This variable indicates  the color to reset the input field to on exit.
  672.      The default is 30.
  673.  
  674.      _le_toggle_key1
  675.      This variable is the integer value of the  key to be used for returning
  676.      to the  previous field when using the le_input() function.  The default
  677.      value is the reverse tab  (shift-tab).  If you use a special key, don't
  678.      forget  that its integer  value is its  value times 256.   For example,
  679.      CTRL-Left Arrow  is 29440.  Also, if you use a regular key, its integer
  680.      value is its scan code times 256 plus its ASCII value.
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.      ----------------------------------------------------------------------
  692.      LE_C Library (c) Copyright 1990 By ProBATE Software
  693.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 7
  694.  
  695.  
  696.  
  697.  
  698.                                                                      Globals
  699.      -----------------------------------------------------------------------
  700.  
  701.      _le_toggle_key2
  702.      This variable is the integer value of the key  to be used for advancing
  703.      to the  next field  when using  the le_input()  function.   The default
  704.      value is the tab key.  If you use  a special key, don't forget that its
  705.      integer value is the value times 256.  For example, CTRL-Right Arrow is
  706.      29696.  Also, if you use  a regular key, its integer value is  its scan
  707.      code times 256 plus its ASCII value.
  708.  
  709.      _le_skey[]
  710.      This table of integers defines a list  of special function keys for use
  711.      with the LE_C input and  menu functions.  Up to 40 special  keys may be
  712.      defined.   If you  use a special  extended key,  don't forget  that its
  713.      integer value is the value times 256.  For example, CTRL-Right Arrow is
  714.      29696 (116 * 256).   Also, if you use a regular  key, its integer value
  715.      is its scan code times 256 plus its ASCII value.
  716.  
  717.      Every item in the _le_skey[] table is initialized to zero.
  718.  
  719.      The LE_C input and menu functions  will return a value from -11 to  -51
  720.      for table elements 0-39 respectively.
  721.  
  722.  
  723.      le_menu.c globals
  724.  
  725.      _le_bmenu_bar_clr
  726.      This variable contains the color to be used for the menu bar for a call
  727.      to le_bmenu().  Its default value is 12.
  728.  
  729.      _le_bmenu_clr
  730.      This variable contains the color to be used for the menu for a call  to
  731.      le_bmenu().  Its default value is 112.
  732.  
  733.      _le_bmenu_act_clr
  734.      This  variable contains  the color to  be used for  the activation (hot
  735.      key) key in the menu bar.  Its default value is 15.
  736.  
  737.      _le_bmenu_norm_act_clr
  738.      This variable contains  the color to  be used for  the activation  (hot
  739.      key) key in the menu.  Its default value is 127.
  740.  
  741.      _le_bmenu_shadow
  742.      This variable contains the shadow color for the menu.  If
  743.      you do not wish to use the shadow feature, set it to 0.
  744.  
  745.  
  746.  
  747.  
  748.  
  749.      ----------------------------------------------------------------------
  750.      LE_C Library (c) Copyright 1990 By ProBATE Software
  751.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 8
  752.  
  753.  
  754.  
  755.  
  756.                                                                      Globals
  757.      -----------------------------------------------------------------------
  758.  
  759.      _le_bmenu_hot_sw
  760.      This switch indicates whether  or not menu selections can  be activated
  761.      by a hot key.  Its default value is 1 for on.
  762.  
  763.      _le_bmenu_width
  764.      This variable contains  the explicit width  of a  bar menu.   If it  is
  765.      zero,  the  le_bmenu()  function  will  automatically  size  the  menu.
  766.      Otherwise, le_bmenu()  will set it  to the  defined with.   Its default
  767.      value is 0.
  768.  
  769.      _le_bmenu_rows
  770.      This variable contains the  explicit number of rows of a  bar menu.  If
  771.      it is zero, the  le_bmenu() function will automatically size  the menu.
  772.      Otherwise, le_bmenu() will set the number  of rows to the defined rows.
  773.      Its default value is 0.
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.      ----------------------------------------------------------------------
  808.      LE_C Library (c) Copyright 1990 By ProBATE Software
  809.      Publishing Co., Inc. - Call 303-352-3445 to Order                Page 9
  810.  
  811.  
  812.  
  813.  
  814.                                                               LE_C Functions
  815.      -----------------------------------------------------------------------
  816.  
  817.                                   LE_C Functions
  818.  
  819.      The following is an explanation of each of the LE_C functions.  A brief
  820.      description, required parameters, and  a short example is  provided for
  821.      each function.   Feel free to experiment with the examples.  After all,
  822.      the best way to discover LE_C's functions is by doing.
  823.  
  824.      le_date.c functions
  825.  
  826.      le_get_date(date, row, col, xkey, help)
  827.  
  828.      This function will allow the user to  enter a date in the standard date
  829.      format of either MM/DD/YY  or MM/DD/YYYY.  This routine will not verify
  830.      a date.  Use the le_verify_date() to validate a date.
  831.  
  832.      The function will automatically  advance to the next space  when either
  833.      at the end of the MM or DD field  or when the / is pressed.  The  space
  834.      bar may be used to clear the field and start over.
  835.  
  836.        (char *) date : character pointer to 11 byte date field
  837.        (char) row : row position of input field
  838.        (char) col : column position of input field
  839.        (struct fkey) xkey : active function keys
  840.        (int) help : help page
  841.  
  842.      Return Value:  0 is returned if enter pressed
  843.                     A non zero is returned if a special key was pressed
  844.                     -100 is returned if ESC was pressed
  845.  
  846.      Example:
  847.      #include <stdio.h>
  848.      #include <le_c.h>
  849.  
  850.      /* this program assumes that the le_c.hlp file
  851.         contains page one of the help facility */
  852.  
  853.      /* this function will allow the input of a date */
  854.      main()
  855.      {
  856.         char my_date[]={"  /  /    "};
  857.         struct fkey xkey;
  858.         int ret_val;
  859.  
  860.         le_init_fkey_struct(&xkey);  /* initialize function key structure */
  861.  
  862.         xkey.F10=1;          /* exit if F10 is pressed */
  863.  
  864.  
  865.      ----------------------------------------------------------------------
  866.      LE_C Library (c) Copyright 1990 By ProBATE Software
  867.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 10
  868.  
  869.  
  870.  
  871.  
  872.                                                               LE_C Functions
  873.      -----------------------------------------------------------------------
  874.  
  875.         /* clear screen */
  876.         le_clear_block(0,0,24,79,30);
  877.  
  878.         /* get date */
  879.         ret_val=le_get_date(my_date, 10, 0, xkey, 1);
  880.  
  881.         le_goto_xy(20,0);
  882.         printf("Return value: %d",ret_val);
  883.      }
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.      ----------------------------------------------------------------------
  924.      LE_C Library (c) Copyright 1990 By ProBATE Software
  925.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 11
  926.  
  927.  
  928.  
  929.  
  930.                                                               LE_C Functions
  931.      -----------------------------------------------------------------------
  932.  
  933.      le_dbl.c functions
  934.  
  935.      le_get_double(value, row, col, left, right, xkey, help)
  936.  
  937.      This function will allow the user to input a double value.   This value
  938.      may have  up to 1-12  digits left of  the decimal point  and up to  1-6
  939.      digits right of the decimal point.  The  input and output colors may be
  940.      changed by changing the global variables _le_clr_in & _le_clr_out.
  941.  
  942.      The space bar may be used to clear the field. 
  943.       
  944.        (double *) value : pointer to double precision variable
  945.        (char) row : row position of input field
  946.        (char) col : column position of input field
  947.        (char) left : digits left of decimal
  948.        (char) right : digits right of decimal
  949.        (struct fkey) xkey : active function keys
  950.        (int) help : help facility page
  951.  
  952.      Return Value:  0 is returned if enter pressed
  953.                     A non zero is returned if a special key was pressed
  954.                     -100 is returned if ESC was pressed
  955.      Example:
  956.      #include <stdio.h>
  957.      #include <le_c.h>
  958.  
  959.      /* this program assumes that the le_c.hlp file
  960.         contains page one of the help facility */
  961.      /* this function will allow the input of a double value */
  962.      main()
  963.      {
  964.         double my_value=12345.6789;
  965.         struct fkey xkey;
  966.         int ret_val;
  967.  
  968.         le_init_fkey_struct(&xkey);  /* initialize function key structure */
  969.  
  970.         xkey.F10=1;          /* exit if F10 is pressed */
  971.  
  972.         /* clear screen */
  973.         le_clear_block(0,0,24,79,30);
  974.         /* get value */
  975.         ret_val=le_get_double(&my_value, 10, 0, 8, 6, xkey, 1);
  976.  
  977.         le_goto_xy(20,0);
  978.         printf("Return value: %d",ret_val);
  979.      }
  980.  
  981.      ----------------------------------------------------------------------
  982.      LE_C Library (c) Copyright 1990 By ProBATE Software
  983.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 12
  984.  
  985.  
  986.  
  987.  
  988.                                                               LE_C Functions
  989.      -----------------------------------------------------------------------
  990.  
  991.      le_format_double(value, format, left, right, dollar_sw)
  992.  
  993.      This function  will format a  double type  with commas and  an optional
  994.      dollar sign.   A pointer to the  double type is passed  in addition the
  995.      format string, the maximum number of digits left of the  decimal point,
  996.      the maximum number of digits right of the decimal point, and the dollar
  997.      sign switch.  This function will  automatically round the value to  the
  998.      right_dig precision.  This  function assumes that the format  string is
  999.      large enough to receive  the formatted value.  Its minimum  size should
  1000.      be the total of  left_dig, right_dig, 1 for decimal point,  1 for sign,
  1001.      and 1 for null terminating string.
  1002.  
  1003.        (double *) value : double pointer to value
  1004.        (char []) format : format string
  1005.        (int) left : number of digits left of decimal
  1006.        (int) right : number of digits right of decimal
  1007.        (char) dollar_sw : dollar sign switch
  1008.  
  1009.      Return Value : 0 is returned if unsuccessful
  1010.                     1 is returned if successful
  1011.  
  1012.      Example:
  1013.      #include <stdio.h>
  1014.      #include <le_c.h>
  1015.  
  1016.  
  1017.      /* this program will format a double value */
  1018.      main()
  1019.      {
  1020.           double my_value=12345.6789;
  1021.           char format1[15];
  1022.  
  1023.           le_format_double(&my_value, format1, 6, 2, 1);
  1024.           printf("Formatted value:  %s\n",format1);
  1025.      }
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.      ----------------------------------------------------------------------
  1040.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1041.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 13
  1042.  
  1043.  
  1044.  
  1045.  
  1046.                                                               LE_C Functions
  1047.      -----------------------------------------------------------------------
  1048.  
  1049.      le_round_double(value, digits)
  1050.  
  1051.      This function will round a double  precision up to the specified number
  1052.      of decimal digits (0-6).
  1053.  
  1054.        (double *) value : pointer to double to be rounded
  1055.        (int) digits : number of decimal digits to round to
  1056.  
  1057.      Return Value: none
  1058.  
  1059.      Example:
  1060.  
  1061.      #include <stdio.h>
  1062.      #include <le_c.h>
  1063.  
  1064.      main()
  1065.      {
  1066.         double my_value=12345.6789;
  1067.  
  1068.         printf("Before rounding: %10.4lf\n",my_value);
  1069.  
  1070.         /* round value to 2 digits */
  1071.         le_round_double(&my_value, 2);
  1072.  
  1073.         printf("After rounding: %10.4lf\n",my_value);
  1074.      }
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.      ----------------------------------------------------------------------
  1098.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1099.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 14
  1100.  
  1101.  
  1102.  
  1103.  
  1104.                                                               LE_C Functions
  1105.      -----------------------------------------------------------------------
  1106.  
  1107.      le_help.c functions
  1108.  
  1109.      le_read_help() & le_help(help_page)
  1110.  
  1111.      le_read_help()
  1112.      This function will  read the help file  and build a table of  help page
  1113.      locations.  The help file must be in  the following layout in order for
  1114.      this function to read it successfully.  The width of each line in  this
  1115.      ASCII file must  be <=  _le_help_width.   It is  recommended that  this
  1116.      function  be  called during  initialization  of the  program  since the
  1117.      entire help facility must be read.  Otherwise, le_help() will call this
  1118.      function if the le_help_page[] table has not been initialized.
  1119.  
  1120.         Help file layout:
  1121.         >1                   <-  Page #
  1122.         This is help page number one.
  1123.         This is line two of number one.
  1124.         >2
  1125.         This is help page number two.
  1126.         >3
  1127.         This is help page number three.
  1128.         <                    <-End of help facility
  1129.  
  1130.      Return Value:  none
  1131.  
  1132.      le_help(help_page)
  1133.      This function will display a page from the help facility.   The current
  1134.      screen is automatically saved  by a call to le_save_scrn()  and will be
  1135.      restored upon exit by le_restore_scrn().  The help_page must be a valid
  1136.      help page of  the facility.  If  the _le_help_move_sw is set,  the user
  1137.      may move the help  window with the arrow keys.  The help screen will be
  1138.      displayed until the user presses any key.  Please  read the information
  1139.      on the le_help.c globals for changing various le_help() defaults.
  1140.  
  1141.        (int) help_page : help page in help facility
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.      ----------------------------------------------------------------------
  1156.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1157.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 15
  1158.  
  1159.  
  1160.  
  1161.  
  1162.                                                               LE_C Functions
  1163.      -----------------------------------------------------------------------
  1164.  
  1165.      Example:
  1166.  
  1167.      #include <le_c.h>
  1168.  
  1169.      /* this program assumes that the le_c.hlp file has been
  1170.         established in the current directory and contains
  1171.         page 1 */
  1172.      main()
  1173.      {
  1174.           le_read_help();
  1175.           _le_help_explode_sw=0;  /* turn explode switch off */
  1176.           help_example();
  1177.      }
  1178.  
  1179.      /* this function will clear the screen, display a message,
  1180.         and activate page 1 of the help facility */
  1181.      help_example()
  1182.      {
  1183.           /* clear screen */
  1184.           le_clear_block(0,0,24,79,30);
  1185.  
  1186.           le_write_string(0,0,"Press any key to exit the help or",30);
  1187.           le_write_string(1,0,"the arrow keys to move the help window",30);
  1188.           le_help(1);
  1189.      }
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.      ----------------------------------------------------------------------
  1214.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1215.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 16
  1216.  
  1217.  
  1218.  
  1219.  
  1220.                                                               LE_C Functions
  1221.      -----------------------------------------------------------------------
  1222.  
  1223.      le_init.c functions
  1224.  
  1225.      le_init_field(field, chr, size)
  1226.  
  1227.      This function will  initialize a field  to a desired  character.   This
  1228.      function assumes that *str points to a field of size+1 or larger.
  1229.  
  1230.        (char *) field : character pointer to field
  1231.        (char) chr : initialization character
  1232.        (int) size : size of field
  1233.  
  1234.      Return Value: none
  1235.  
  1236.      Example:
  1237.      #include <stdio.h>
  1238.      #include <le_c.h>
  1239.  
  1240.      /* this program will initialize a field to '*' */
  1241.      main()
  1242.      {
  1243.           char test[11];
  1244.  
  1245.           le_init_field(test, '*', 10);
  1246.  
  1247.           printf("Result:  %s\n",test);
  1248.      }
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.      ----------------------------------------------------------------------
  1272.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1273.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 17
  1274.  
  1275.  
  1276.  
  1277.  
  1278.                                                               LE_C Functions
  1279.      -----------------------------------------------------------------------
  1280.  
  1281.      le_inpt.c functions
  1282.  
  1283.      le_input(input_flds, items, pos, xkey)
  1284.  
  1285.      This  function  will circulate  through a  series  of input  fields for
  1286.      input.        The   le_get_double(),    le_get_long(),   le_get_date(),
  1287.      le_item_switch(), le_get_string(), and le_get_multln() functions may be
  1288.      used.  An array of
  1289.      le_input  structures is set  up with  information describing  the input
  1290.      fields.
  1291.  
  1292.      The up/down  arrow keys may be used to toggle  from field to field.  In
  1293.      addition, the le_toggle_key1 and  le_toggle_key2 may be used  to toggle
  1294.      the fields (default: tab and reverse tab);
  1295.  
  1296.        (struct le_input[]) input_flds : structure array of input fields
  1297.        (int) items : number of input fields
  1298.        (int *) : current input field
  1299.        (struct fkey xkey) : active function keys
  1300.  
  1301.      Return Value:  0 is returned if enter pressed
  1302.                     A non zero is returned if a special key was pressed
  1303.                     -100 is returned if ESC was pressed
  1304.  
  1305.      Example:
  1306.      #include <stdio.h>
  1307.      #include <le_c.h>
  1308.  
  1309.      /* this program assumes that the le_c.hlp file
  1310.         has one page -- not all fields use a help page */
  1311.  
  1312.      main()
  1313.      {
  1314.           struct le_input inputf[7];
  1315.           char my_mfield[401];
  1316.           char my_field[41];
  1317.           char my_date[11]={"  /  /    "};
  1318.           long my_long1=0L;
  1319.           long my_long2=0L;
  1320.           double my_dbl=0.0;
  1321.           int input_pos=0;
  1322.  
  1323.           char *my_items[]=
  1324.           {
  1325.             "Apples",
  1326.             "Oranges",
  1327.             "Grapes"
  1328.  
  1329.      ----------------------------------------------------------------------
  1330.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1331.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 18
  1332.  
  1333.  
  1334.  
  1335.  
  1336.                                                               LE_C Functions
  1337.      -----------------------------------------------------------------------
  1338.  
  1339.           };
  1340.           int ret_val;
  1341.           struct fkey xkey;
  1342.  
  1343.           le_init_fkey_struct(&xkey);
  1344.  
  1345.           xkey.F10=1;             /* exit on F10 */
  1346.  
  1347.           /* clear screen */
  1348.           le_clear_block(0,0,24,79,30);
  1349.  
  1350.           /* initialize fields to spaces */
  1351.           le_init_field(my_mfield, ' ', 400);
  1352.           le_init_field(my_field,' ', 40);
  1353.  
  1354.           /* prime input array */
  1355.           le_write_string(5,0,"Long 1:",30);
  1356.           inputf[0].long_val=&my_long1;
  1357.           inputf[0].type=GET_LONG;
  1358.           inputf[0].row=5;
  1359.           inputf[0].col=10;
  1360.           inputf[0].size=6;
  1361.           inputf[0].help=1;
  1362.  
  1363.           le_write_string(7,0,"Long 2:",30);
  1364.           inputf[1].long_val=&my_long2;
  1365.           inputf[1].type=GET_LONG;
  1366.           inputf[1].row=7;
  1367.           inputf[1].col=10;
  1368.           inputf[1].size=6;
  1369.           inputf[1].help=1;
  1370.  
  1371.           le_write_string(5,20,"String:",30);
  1372.           inputf[2].string=my_field;
  1373.           inputf[2].type=GET_STRING;
  1374.           inputf[2].row=5;
  1375.           inputf[2].col=30;
  1376.           inputf[2].size=40;
  1377.           inputf[2].help=1;
  1378.  
  1379.           le_write_string(7,20,"Mult:",30);
  1380.           inputf[3].string=my_mfield;
  1381.           inputf[3].type=GET_MULTLN;
  1382.           inputf[3].row=7;
  1383.           inputf[3].col=30;
  1384.           inputf[3].size=40;
  1385.           inputf[3].lines=10;
  1386.  
  1387.      ----------------------------------------------------------------------
  1388.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1389.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 19
  1390.  
  1391.  
  1392.  
  1393.  
  1394.                                                               LE_C Functions
  1395.      -----------------------------------------------------------------------
  1396.  
  1397.           inputf[3].help=1;
  1398.  
  1399.           le_write_string(19,20,"Date:",30);
  1400.           inputf[4].string=my_date;
  1401.           inputf[4].type=GET_DATE;
  1402.           inputf[4].row=19;
  1403.           inputf[4].col=30;
  1404.           inputf[4].help=0;
  1405.  
  1406.           le_write_string(21,20,"Double:",30);
  1407.           inputf[5].dbl_val=&my_dbl;
  1408.           inputf[5].type=GET_DOUBLE;
  1409.           inputf[5].row=21;
  1410.           inputf[5].col=30;
  1411.           inputf[5].left_dig=6;
  1412.           inputf[5].right_dig=3;
  1413.           inputf[5].help=0;
  1414.  
  1415.           le_write_string(23,20,"Items:",30);
  1416.           inputf[6].type=GET_ITEM;
  1417.           inputf[6].row=23;
  1418.           inputf[6].col=30;
  1419.           inputf[6].lines=3;      /* number of items */
  1420.           inputf[6].item_pos=0;
  1421.           inputf[6].size=7;
  1422.           inputf[6].help=1;
  1423.           inputf[6].item_table=my_items;
  1424.  
  1425.           input_pos=0;
  1426.           ret_val=le_input(inputf, 7, &input_pos, xkey);
  1427.           printf("Return value:  %d\n",ret_val);
  1428.      }
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.      ----------------------------------------------------------------------
  1446.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1447.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 20
  1448.  
  1449.  
  1450.  
  1451.  
  1452.                                                               LE_C Functions
  1453.      -----------------------------------------------------------------------
  1454.  
  1455.      le_item.c functions
  1456.  
  1457.      le_item_switch(item_info, items, xkey, help)
  1458.  
  1459.      This function will allow the user to switch between various pre-defined
  1460.      alternatives in the *item_ptr[]  array.  The arrow keys,  spacebar, and
  1461.      tab  key  will be  used  to toggle  between  selections.   The  ESC and
  1462.      function  keys  will terminate  the  function  and return  the  current
  1463.      position  to the calling  function.  The  *item_info is a  pointer to a
  1464.      structure containing information about the various items.
  1465.  
  1466.        (item_struct *) item_info : pointer to item_struct
  1467.        (char *[]) items : pointer array to items
  1468.        (struct fkey) xkey : active function keys
  1469.        (int) help : help page
  1470.  
  1471.      Return Value:  0 is returned if enter pressed
  1472.                     A non zero is returned if a special key was pressed
  1473.                     -100 is returned if ESC was pressed
  1474.  
  1475.      Example:
  1476.      #include <stdio.h>
  1477.      #include <le_c.h>
  1478.  
  1479.      /* this program assumes that the le_c.hlp file
  1480.         contains page one of the help facility */
  1481.  
  1482.  
  1483.      /* this function will allow the user to toggle various items */
  1484.      main()
  1485.      {
  1486.         char *my_items[]=
  1487.         {
  1488.            "This is the first item",
  1489.            "This is the second item"
  1490.         };
  1491.         struct fkey xkey;
  1492.         struct item_struct item_info;
  1493.         int ret_val;
  1494.  
  1495.         /* prime item structure with info */
  1496.         item_info.row=10;
  1497.         item_info.col=0;
  1498.         item_info.pos=0;
  1499.         item_info.width=23;
  1500.         item_info.items=2;
  1501.  
  1502.  
  1503.      ----------------------------------------------------------------------
  1504.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1505.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 21
  1506.  
  1507.  
  1508.  
  1509.  
  1510.                                                               LE_C Functions
  1511.      -----------------------------------------------------------------------
  1512.  
  1513.         le_init_fkey_struct(&xkey);  /* initialize function key structure */
  1514.  
  1515.         xkey.F10=1;          /* exit if F10 is pressed */
  1516.  
  1517.         /* clear screen */
  1518.         le_clear_block(0,0,24,79,30);
  1519.  
  1520.         /* get item */
  1521.         ret_val=le_item_switch(&item_info, my_items, xkey, 1);
  1522.  
  1523.         le_goto_xy(20,0);
  1524.         printf("Return value: %d",ret_val);
  1525.      }
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.      ----------------------------------------------------------------------
  1562.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1563.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 22
  1564.  
  1565.  
  1566.  
  1567.  
  1568.                                                               LE_C Functions
  1569.      -----------------------------------------------------------------------
  1570.  
  1571.      le_key.c functions
  1572.  
  1573.      le_get_key()
  1574.  
  1575.      This function will wait for a key stroke and return that  key stroke in
  1576.      the union variable defined in the calling function.
  1577.  
  1578.      Return Value:  int value of key pressed
  1579.  
  1580.      Example:
  1581.      #include <stdio.h>
  1582.      #include <le_c.h>
  1583.  
  1584.      /* this program will call le_get_key() and
  1585.         determine if the key pressed was a special
  1586.         key (function key, etc.) or a normal key */
  1587.      main()
  1588.      {
  1589.           union key_in
  1590.           {
  1591.             char ch[2];
  1592.             int i;
  1593.           } in_key;
  1594.  
  1595.           printf("Press a key...\n");
  1596.           in_key.i=le_get_key();
  1597.  
  1598.           if(!in_key.ch[0])
  1599.             printf("Special key was pressed.\n");
  1600.           else
  1601.             printf("Regular key was pressed.\n");
  1602.      }
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.      ----------------------------------------------------------------------
  1620.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1621.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 23
  1622.  
  1623.  
  1624.  
  1625.  
  1626.                                                               LE_C Functions
  1627.      -----------------------------------------------------------------------
  1628.  
  1629.      le_long.c functions
  1630.  
  1631.      le_get_long(value, row, col, size, xkey, help)
  1632.  
  1633.      This function  will allow the user to  enter a long integer  up to nine
  1634.      digits.  The space bar may be used to clear the field.
  1635.  
  1636.        (long *) value : pointer to long integer
  1637.        (char) row : row position of input field
  1638.        (char) col : column position of input field
  1639.        (char) size : width of field
  1640.        (struct fkey) xkey : active function keys
  1641.        (int) help : help page
  1642.  
  1643.      Return Value:  0 is returned if enter pressed
  1644.                     A non zero is returned if a special key was pressed
  1645.                     -100 is returned if ESC was pressed
  1646.  
  1647.      Example:
  1648.  
  1649.      #include <stdio.h>
  1650.      #include <le_c.h>
  1651.  
  1652.      /* this program assumes that the le_c.hlp file
  1653.         contains page one of the help facility */
  1654.  
  1655.  
  1656.      /* this function will allow the input of a long integer */
  1657.      main()
  1658.      {
  1659.         long my_long=123456L;
  1660.         struct fkey xkey;
  1661.         int ret_val;
  1662.  
  1663.         le_init_fkey_struct(&xkey);  /* initialize function key structure */
  1664.  
  1665.         xkey.F10=1;          /* exit if F10 is pressed */
  1666.  
  1667.         /* clear screen */
  1668.         le_clear_block(0,0,24,79,30);
  1669.  
  1670.         /* get value */
  1671.         ret_val=le_get_long(&my_long, 10, 0, 8, xkey, 1);
  1672.  
  1673.         le_goto_xy(20,0);
  1674.         printf("Return value: %d",ret_val);
  1675.      }
  1676.  
  1677.      ----------------------------------------------------------------------
  1678.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1679.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 24
  1680.  
  1681.  
  1682.  
  1683.  
  1684.                                                               LE_C Functions
  1685.      -----------------------------------------------------------------------
  1686.  
  1687.      le_format_long(value, form_str[], size, dollar_sw)
  1688.  
  1689.      This function  will format a long  integer with commas and  an optional
  1690.      dollar sign.  If the value exceeds  the desired size, the function will
  1691.      fill  the field  with '*'.   This function  assumes that  form_str[] is
  1692.      large enough to handle the formatted string.
  1693.  
  1694.        (long) value : value to be formatted
  1695.        (char []) form_str : receiving field (null terminated)
  1696.        (int) size : size of receiving field
  1697.        (char) dollar_sw : dollar sign switch
  1698.  
  1699.      Example:
  1700.      #include <stdio.h>
  1701.      #include <le_c.h>
  1702.  
  1703.      /* this program will format a long integer */
  1704.      main()
  1705.      {
  1706.           long my_value=123456L;
  1707.           char format1[15];
  1708.  
  1709.           le_format_long(my_value, format1, 10, 1);
  1710.           printf("Formatted value:  %s\n",format1);
  1711.      }
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.      ----------------------------------------------------------------------
  1736.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1737.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 25
  1738.  
  1739.  
  1740.  
  1741.  
  1742.                                                               LE_C Functions
  1743.      -----------------------------------------------------------------------
  1744.  
  1745.      le_menu.c functions
  1746.  
  1747.      le_bmenu(&menu, items, xkey)
  1748.      This  function  will  display  a bar  menu.    Menu  selections  may be
  1749.      activated by either positioning the cursor bar and pressing enter or by
  1750.      pressing the highlighted "hot"  key.  The cursor bar  may be positioned
  1751.      by using the arrow keys  or the space bar.  Please  see the information
  1752.      on the le_menu.c globals for changing default settings.
  1753.  
  1754.      A  value of NULL may be used as a menu selection so as to create a line
  1755.      separating groups of selections.
  1756.  
  1757.      Help  may be defined  for both the menu  selection and the  menu.  If a
  1758.      help  page is  specified for both  the menu  and a selection,  the menu
  1759.      selection's help page will be used.  If the current menu selection does
  1760.      not have a help page  (0), the menu's help page will be used.   If both
  1761.      the menu and the current selection  do not have a specified help  page,
  1762.      no help will be displayed.
  1763.  
  1764.        (struct BMENU *) menu : pointer to BMENU menu information
  1765.        (struct BMENU_ITEMS []) items : array of menu items
  1766.        (struct fkey) : xkey : active function keys
  1767.  
  1768.      Return Value:  0 is returned if a menu selection was made
  1769.                     A non zero is returned if a special key was pressed
  1770.                     -100 is returned if ESC was pressed
  1771.  
  1772.      Example:
  1773.  
  1774.      #include <stdio.h>
  1775.      #include <le_c.h>
  1776.  
  1777.      /* This program assumes that the le_c.hlp file exists
  1778.         and contains two pages.  Please note the use
  1779.         of the help page settings to create context
  1780.         sensitive help */
  1781.  
  1782.      /* this structure defines each item, its
  1783.         hot key and the a help page, if any */
  1784.      struct BMENU_ITEMS main_items[] = { "Data Entry", 0, 2,
  1785.                              "Reports", 0, 1,
  1786.                               NULL, 0, 0,       /* NULL draws line */
  1787.                              "Utilities", 0, 0,
  1788.                              "Miscellaneous", 0, 0 };
  1789.  
  1790.  
  1791.  
  1792.  
  1793.      ----------------------------------------------------------------------
  1794.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1795.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 26
  1796.  
  1797.  
  1798.  
  1799.  
  1800.                                                               LE_C Functions
  1801.      -----------------------------------------------------------------------
  1802.  
  1803.      /* this structure defines the title, the row
  1804.         and column of the first selection, the
  1805.         current selection, the number of items,
  1806.         the box type, exploding box, and the
  1807.         help page */
  1808.      struct BMENU main_menu = { "  MAIN MENU  ", 10, 5, 0,
  1809.      5, DOUBLE_LINE, EXPLODE_OFF, 1 };
  1810.  
  1811.      main()
  1812.      {
  1813.           example_menu();
  1814.      }
  1815.  
  1816.      example_menu()
  1817.      {
  1818.          int i, ret_val;
  1819.          struct fkey xkey;           /* active function keys */
  1820.          le_init_fkey_struct(&xkey); /* initialize function key structure */
  1821.  
  1822.          xkey.F5=1;          /* exit on F5 function key */
  1823.          xkey.F6=1;          /* exit on F6 function key */
  1824.  
  1825.          /* clear screen */
  1826.          le_clear_block(0,0,24,79,30);
  1827.  
  1828.          /* display menu */
  1829.          ret_val=le_bmenu(&main_menu, main_items, xkey);
  1830.  
  1831.          le_goto_xy(20,0);
  1832.  
  1833.          /* don't forget that the NULL selection counts
  1834.             as one selection */
  1835.          printf("Current selection: %d\n",main_menu.pos+1);
  1836.          printf("Return value is: %d\n",ret_val);
  1837.      }
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.      ----------------------------------------------------------------------
  1852.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1853.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 27
  1854.  
  1855.  
  1856.  
  1857.  
  1858.                                                               LE_C Functions
  1859.      -----------------------------------------------------------------------
  1860.  
  1861.      le_box_menu(menu, items, xkey)
  1862.  
  1863.      This  function will display a box menu type.   The user may use the tab
  1864.      and arrow keys to position the current  selection.  A selection is made
  1865.      by pressing  the enter key  or the hot  key for the  desired selection.
  1866.      The function will position the box based on the row/col position.  The
  1867.      row/col position is the position of the first menu selection. 
  1868.  
  1869.      Up to three  optional messages may be  provided.  The  size of the  box
  1870.      will adjust to accommodate each additional message.
  1871.  
  1872.      Help may be defined for both the menu selection and the menu. If a help
  1873.      page  is  specified  for both  the  menu  and  a  selection,  the  menu
  1874.      selection's help page will be used.  If the current menu selection does
  1875.      not have a help page (0), the menu's  help page will be used.  If  both
  1876.      the menu and the  current selection do not have a  specified help page,
  1877.      no help will be displayed.
  1878.  
  1879.        (struct BOX_MENU *) menu : pointer to BOX_MENU menu information
  1880.        (struct BMENU_ITEMS []) items : array of menu items
  1881.        (struct fkey) : xkey : active function keys
  1882.  
  1883.      Return Value:  0 is returned if a menu selection was made
  1884.                     A non zero is returned if a special key was pressed
  1885.                     -100 is returned if ESC was pressed
  1886.  
  1887.      Example:
  1888.  
  1889.      #include <stdio.h>
  1890.      #include <le_c.h>
  1891.  
  1892.      /* This program assumes that the le_c.hlp file exists
  1893.         and contains two pages.  Please note the use
  1894.         of the help page settings to create context
  1895.         sensitive help */
  1896.  
  1897.      /* this structure defines the box menu message (only 1
  1898.         is used), the current position, row/col, number
  1899.         of selections, explode switch, and help page */
  1900.  
  1901.      struct BOX_MENU exit_menu = { "Are you sure you want to exit?", "",
  1902.      "", 0, 8, 30, 3, EXPLODE_ON, 1 };
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.      ----------------------------------------------------------------------
  1910.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1911.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 28
  1912.  
  1913.  
  1914.  
  1915.  
  1916.                                                               LE_C Functions
  1917.      -----------------------------------------------------------------------
  1918.  
  1919.      /* this structure defines each item, its
  1920.         hot key and the a help page, if any */
  1921.      struct BMENU_ITEMS exit_items[] = {"Yes", 0, 1,
  1922.                                         "No", 0, 1,
  1923.                                         "Cancel", 0, 1};
  1924.  
  1925.      main()
  1926.      {
  1927.           example_box_menu();
  1928.      }
  1929.  
  1930.      example_box_menu()
  1931.      {
  1932.          int i, ret_val;
  1933.          struct fkey xkey;           /* active function keys */
  1934.          le_init_fkey_struct(&xkey); /* initialize function key structure */
  1935.  
  1936.          xkey.F5=1;          /* exit on F5 function key */
  1937.          xkey.F6=1;          /* exit on F6 function key */
  1938.  
  1939.          /* clear screen */
  1940.          le_clear_block(0,0,24,79,30);
  1941.  
  1942.          /* display menu */
  1943.          ret_val=le_box_menu(&exit_menu, exit_items, xkey);
  1944.  
  1945.          le_goto_xy(20,0);
  1946.  
  1947.          printf("Current selection: %d\n",exit_menu.pos+1);
  1948.          printf("Return value is: %d\n",ret_val);
  1949.      }
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.      ----------------------------------------------------------------------
  1968.      LE_C Library (c) Copyright 1990 By ProBATE Software
  1969.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 29
  1970.  
  1971.  
  1972.  
  1973.  
  1974.                                                               LE_C Functions
  1975.      -----------------------------------------------------------------------
  1976.  
  1977.      le_misc.c functions
  1978.  
  1979.      le_goto_xy(x, y)
  1980.  
  1981.        (char) x : row position
  1982.        (char) y : column position
  1983.  
  1984.      This function calls  the ROM-BIOS  service function 2  to position  the
  1985.      cursor at x,y on the screen.
  1986.  
  1987.      Return Value: none
  1988.  
  1989.      Example:
  1990.  
  1991.      #include <stdio.h>
  1992.      #include <le_c.h>
  1993.  
  1994.      /* this program will position the cursor at absolute
  1995.         row 15 and column 10 and display a message */
  1996.      main()
  1997.      {
  1998.           le_goto_xy(15,10);
  1999.           printf("This message started at row 16/column 11.\n");
  2000.      }
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.      ----------------------------------------------------------------------
  2026.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2027.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 30
  2028.  
  2029.  
  2030.  
  2031.  
  2032.                                                               LE_C Functions
  2033.      -----------------------------------------------------------------------
  2034.  
  2035.      le_scroll_up(startx, starty, endx, endy, rows, attrib)
  2036.  
  2037.      This function will  scroll a window  of the screen  up.  The  number of
  2038.      lines to scroll  up is  designated by  the rows parameter.   The  blank
  2039.      line(s) is filled  with spaces  using attrib for  the color  attribute.
  2040.      This function  calls the  ROM-BIOS function  service 6  to perform  the
  2041.      scrolling. 
  2042.  
  2043.      le_scroll_down(startx, starty, endx, endy, rows, attrib)
  2044.  
  2045.      This function will scroll a  window of the screen down.  The  number of
  2046.      lines to scroll  down is designated by  the rows parameter.   The blank
  2047.      line(s) is filled  with spaces  using attrib for  the color  attribute.
  2048.      This function  calls the  ROM-BIOS function  service 7  to perform  the
  2049.      scrolling.
  2050.  
  2051.        (char) startx : starting row position
  2052.        (char) starty : starting column position
  2053.        (char) endx : ending row position
  2054.        (char) endy : ending column position
  2055.        (char) rows : number of rows to scroll
  2056.        (char) attrib : fill color
  2057.  
  2058.      Return Value : 1 is returned if successful
  2059.                     0 is returned if unsuccessful
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.      ----------------------------------------------------------------------
  2084.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2085.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 31
  2086.  
  2087.  
  2088.  
  2089.  
  2090.                                                               LE_C Functions
  2091.      -----------------------------------------------------------------------
  2092.  
  2093.      Example:
  2094.  
  2095.      #include <stdio.h>
  2096.      #include <conio.h>
  2097.      #include <le_c.h>
  2098.  
  2099.      main()
  2100.      {
  2101.           scroll_example();
  2102.           exit(1);
  2103.      }
  2104.  
  2105.      /* this function will display 15 lines, wait for a key,
  2106.         scroll a window up 3 lines, wait for a key, and
  2107.         scroll the window down 2 lines */
  2108.      scroll_example()
  2109.      {
  2110.           int i;
  2111.  
  2112.           le_clear_block(0,0,24,79,30);   /* clear the screen */
  2113.  
  2114.           for(i=0;i<15;i++)       /* fill a window */
  2115.           {
  2116.              le_goto_xy(i,10);    /* position the cursor */
  2117.              printf("Row:  %d  Scroll Example",i+1);
  2118.           }
  2119.           le_goto_xy(18,0);
  2120.           printf("Press any key to scroll window up 3 lines...");
  2121.           getch();                /* wait for key */
  2122.  
  2123.           /* scroll up */
  2124.           le_scroll_up(0,10,14,40,3,30);
  2125.  
  2126.           printf("\nPress any key to scroll window down 2 lines...\n");
  2127.           getch();                /* wait for key */
  2128.  
  2129.           /* scroll down */
  2130.           le_scroll_down(0,10,14,40,2,30);
  2131.  
  2132.      }
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.      ----------------------------------------------------------------------
  2142.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2143.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 32
  2144.  
  2145.  
  2146.  
  2147.  
  2148.                                                               LE_C Functions
  2149.      -----------------------------------------------------------------------
  2150.  
  2151.      le_size_cursor(cursor_sw)
  2152.  
  2153.        (int) cursor_sw : CURSOR_ON, CURSOR_OFF, CURSOR_INSERT
  2154.  
  2155.      Return Value: none
  2156.  
  2157.      This function will  set the cursor  the normal size, CURSOR_ON,  insert
  2158.      mode, CURSOR_INSERT, or  turn the cursor off,  CURSOR_OFF. The function
  2159.      will  automatically  size  the  cursor for  both  monochrome  and color
  2160.      screens.
  2161.  
  2162.      Example:
  2163.  
  2164.      #include <conio.h>
  2165.      #include <stdio.h>
  2166.      #include <le_c.h>
  2167.  
  2168.      /* this program will set the cursor to off, insert, and
  2169.         normal modes */
  2170.  
  2171.      main()
  2172.      {
  2173.           le_size_cursor(CURSOR_OFF);
  2174.           printf("\nCursor is off ... press any key");
  2175.           getch();
  2176.           le_size_cursor(CURSOR_INSERT);
  2177.           printf("\nCursor is set to insert ... press any key");
  2178.           getch();
  2179.           le_size_cursor(CURSOR_ON);
  2180.           printf("\nCursor is set to normal mode ... press any key");
  2181.           getch();
  2182.      }
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.      ----------------------------------------------------------------------
  2200.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2201.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 33
  2202.  
  2203.  
  2204.  
  2205.  
  2206.                                                               LE_C Functions
  2207.      -----------------------------------------------------------------------
  2208.  
  2209.      le_save.c functions
  2210.  
  2211.      le_build_buffers(num_buffs)
  2212.  
  2213.        (int) num_buffs : number of screen buffers to allocate
  2214.  
  2215.      Return Value : 1 is returned if successful
  2216.                     0 is returned if unsuccessful
  2217.  
  2218.      This function will build the screen buffers for use with le_save_scrn()
  2219.      and le_restore_scrn().  Up to LE_BUFFS screens (4000 bytes each) may be
  2220.      allocated.  The  function calls _fmalloc()  to allocate memory for  the
  2221.      desired number of  buffers, num_buffs.   If _fmalloc()  returns a  null
  2222.      pointer, the function  will terminate the  program.  The screen  buffer
  2223.      information  is  stored  in  a  structure  type  of  le_buffers  called
  2224.      le_scrn_buf.  A pointer to each buffer page is set for each buffer.  In
  2225.      addition, the index to the current page is set as well as the maximum
  2226.      number of buffers allowed.
  2227.  
  2228.      Example:
  2229.  
  2230.      #include <le_c.h>
  2231.  
  2232.      /* this program will allocate 5 video
  2233.         buffers for saving and restoring screens */
  2234.      main()
  2235.      {
  2236.           le_build_buffers(5);
  2237.           exit(1);
  2238.      }
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.      ----------------------------------------------------------------------
  2258.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2259.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 34
  2260.  
  2261.  
  2262.  
  2263.  
  2264.                                                               LE_C Functions
  2265.      -----------------------------------------------------------------------
  2266.  
  2267.      le_save_block(index, startx, starty, endx, endy)
  2268.      le_restore_block(index, action, startx, starty, endx, endy)
  2269.  
  2270.      le_save_block()
  2271.  
  2272.      This function  will  save  a window  of  the screen  to  a  dynamically
  2273.      allocated buffer.  An index is passed to the function to identify
  2274.      the buffer to be saved.  The function will call _fmalloc to dynamically
  2275.      allocate space for the size  of the buffer.  Both the character and its
  2276.      attribute will be  saved to  the buffer.   The user  may specify  index
  2277.      values 0-18 for saving and  restoring blocks.  Index 19 is used  by the
  2278.      le_help() help facility.
  2279.  
  2280.      le_restore_block()
  2281.  
  2282.      This function will restore and/or free a window previously saved by the
  2283.      le_save_block()  function.     The  value  of  action   determines  the
  2284.      processing.    If  action==RESTORE_ONLY, the  function  will  restore a
  2285.      previously   saved   window   to  the   specified   coordinates.     If
  2286.      action==FREE_ONLY, the window will  not be restored to the  screen, but
  2287.      the   allocated   memory   will   be  released   by   _ffree().      If
  2288.      action==RESTORE_FREE, the previously  saved window will be  restored to
  2289.      the  screen  and  the  buffer  will  be  released  by  _ffree().    The
  2290.      coordinates need not be  the same as those used by the le_save_block().
  2291.      This gives the user the ability to place a window somewhere else on the
  2292.      screen.   However,  do not  specify  a larger  or smaller  window  than
  2293.      originally saved by le_save_block().  This may result in bad screens or
  2294.      program crash.
  2295.  
  2296.         (char) index : block index
  2297.         (char) action : restore action - RESTORE_ONLY, FREE_ONLY,
  2298.                         RESTORE_FREE
  2299.         (char) startx : starting row position
  2300.         (char) starty : starting column position
  2301.         (char) endx : ending row position
  2302.         (char) endy : ending column position
  2303.  
  2304.      Example:
  2305.  
  2306.      #include <stdio.h>
  2307.      #include <conio.h>
  2308.      #include <le_c.h>
  2309.  
  2310.      main()
  2311.      {
  2312.           le_block_example();
  2313.      }
  2314.  
  2315.      ----------------------------------------------------------------------
  2316.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2317.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 35
  2318.  
  2319.  
  2320.  
  2321.  
  2322.                                                               LE_C Functions
  2323.      -----------------------------------------------------------------------
  2324.  
  2325.      le_block_example()
  2326.      {
  2327.           /* clear the screen */
  2328.           le_clear_block(0,0,24,79,30);
  2329.  
  2330.           /* draw a window */
  2331.           le_draw_border(DOUBLE_LINE,4,5,10,30,30,EXPLODE_OFF);
  2332.  
  2333.           /* save the window as block 1 */
  2334.           le_save_block(1,4,5,10,30);
  2335.  
  2336.           le_goto_xy(21,0);
  2337.           printf("Press any key to move window to the right...");
  2338.           getch();
  2339.  
  2340.           /* clear the screen */
  2341.           le_clear_block(0,0,24,79,30);
  2342.  
  2343.           /* restore the block 10 columns to the right */
  2344.           le_restore_block(1, RESTORE_ONLY, 4, 15,  10, 40);
  2345.  
  2346.           printf("\nPress any key to move window down...");
  2347.           getch();
  2348.  
  2349.           /* clear the screen */
  2350.           le_clear_block(0,0,24,79,30);
  2351.  
  2352.           /* restore the block 5 rows down & free memory */
  2353.           le_restore_block(1, RESTORE_FREE, 9, 15,  15, 40);
  2354.  
  2355.      }
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.      ----------------------------------------------------------------------
  2374.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2375.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 36
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                                                               LE_C Functions
  2381.      -----------------------------------------------------------------------
  2382.  
  2383.      le_save_scrn(buffer_num)
  2384.      le_restore_scrn(buffer_num)
  2385.  
  2386.        (int) buffer_num : 0 if next available page desired
  2387.                     non-zero to specify video page
  2388.  
  2389.      The le_save_scrn() function  will save a screen  to a buffer for  a new
  2390.      window or  help screen.   If zero is  passed to the  function, the next
  2391.      available screen buffer is used.   Otherwise, the index, buffer_num, is
  2392.      decremented  by one and used as  the index. Invalid buffer numbers will
  2393.      cause the function to return a value of 0 to the calling function.  The
  2394.      le_build_buffers()  function  should be  called  prior to  calling this
  2395.      function in order to allocate space for the screen.
  2396.  
  2397.      The le_restore_scrn() function  will restore a screen  previously saved
  2398.      to a buffer  using the le_save_scrn() function.   If zero is  passed to
  2399.      the function, the previously saved screen will be restored.  Otherwise,
  2400.      the index,  buffer_num, is  decremented by one  and used as  the index.
  2401.      Invalid buffer numbers will  cause the function to return a  value of 0
  2402.      to the calling function.
  2403.  
  2404.      Return Value : 1 is returned if successful
  2405.                     0 is returned if unsuccessful
  2406.  
  2407.      Example:
  2408.  
  2409.      #include <conio.h>
  2410.      #include <le_c.h>
  2411.  
  2412.      /* this program will allocate 5 screen buffers, save the current
  2413.         screen, display junk, wait for the user to press a key, and
  2414.         restore the screen to its original contents */
  2415.      main()
  2416.      {
  2417.         le_build_buffers(5);         /* allocate 5 screen buffers */
  2418.         save_restore_example();
  2419.      }
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.      ----------------------------------------------------------------------
  2432.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2433.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 37
  2434.  
  2435.  
  2436.  
  2437.  
  2438.                                                               LE_C Functions
  2439.      -----------------------------------------------------------------------
  2440.  
  2441.      save_restore_example()
  2442.      {
  2443.         int i;
  2444.  
  2445.         le_save_scrn(0);     /* save screen */
  2446.  
  2447.         for(i=0;i<20;i++)    /* display junk */
  2448.           le_write_string(i,0,"Junk Junk Junk Junk Junk Junk Junk",30);
  2449.  
  2450.         getch();             /* wait for key */
  2451.  
  2452.         le_restore_scrn(0);  /* restore saved screen */
  2453.      }
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.      ----------------------------------------------------------------------
  2490.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2491.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 38
  2492.  
  2493.  
  2494.  
  2495.  
  2496.                                                               LE_C Functions
  2497.      -----------------------------------------------------------------------
  2498.  
  2499.      le_strng.c functions
  2500.  
  2501.      le_get_multln(editstring, width, lines, row, col, xkey, help)
  2502.  
  2503.      This function  will allow  the  editing of  a multi-line  field.   This
  2504.      function supports word wrap and various edit keys.  
  2505.  
  2506.        (char *) editstring : character pointer to field
  2507.        (int) width : width of field
  2508.        (int) lines : number of lines
  2509.        (int) row : row position of input field
  2510.        (int) col : column position of input field
  2511.        (struct fkey) xkey : active function keys
  2512.        (int) help : help page
  2513.  
  2514.      Return Value:  0 is returned if enter pressed
  2515.                     A non zero is returned if a special key was pressed
  2516.                     -100 is returned if ESC was pressed
  2517.  
  2518.      Example:
  2519.      #include <stdio.h>
  2520.      #include <le_c.h>
  2521.  
  2522.      main()
  2523.      {
  2524.           char field[401];
  2525.           int ret_val;
  2526.           struct fkey xkey;
  2527.  
  2528.           le_init_fkey_struct(&xkey);
  2529.  
  2530.           xkey.F10=1;             /* exit on F10 */
  2531.  
  2532.           /* clear screen */
  2533.           le_clear_block(0,0,24,79,30);
  2534.  
  2535.           /* initialize field to spaces */
  2536.           le_init_field(field, ' ', 400);
  2537.  
  2538.           ret_val=le_get_multln(field, 40, 10, 10, 0, xkey, 0);
  2539.  
  2540.           printf("Return value:  %d\n",ret_val);
  2541.      }
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.      ----------------------------------------------------------------------
  2548.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2549.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 39
  2550.  
  2551.  
  2552.  
  2553.  
  2554.                                                               LE_C Functions
  2555.      -----------------------------------------------------------------------
  2556.  
  2557.      le_get_string(editstring, size, row, col, xkey, help)
  2558.  
  2559.      This function will allow the input of a simple one line field.
  2560.  
  2561.        (char *) editstring : character pointer to field
  2562.        (int) size : width of field
  2563.        (int) row : row of input field
  2564.        (int) col : column of input field
  2565.        (struct fkey) xkey : active function keys
  2566.        (int) help : help page
  2567.  
  2568.      Return Value:  0 is returned if enter pressed
  2569.                     A non zero is returned if a special key was pressed
  2570.                     -100 is returned if ESC was pressed
  2571.  
  2572.      Example:
  2573.      #include <stdio.h>
  2574.      #include <le_c.h>
  2575.  
  2576.      main()
  2577.      {
  2578.           char field[41];
  2579.           int ret_val;
  2580.           struct fkey xkey;
  2581.  
  2582.           le_init_fkey_struct(&xkey);
  2583.  
  2584.           xkey.F10=1;             /* exit on F10 */
  2585.  
  2586.           /* initialize field to spaces */
  2587.           le_init_field(field, ' ', 40);
  2588.  
  2589.           ret_val=le_get_string(field, 40, 10, 0, xkey, 0);
  2590.  
  2591.           printf("\nResult:  %s\n",field);
  2592.           printf("Return value:  %d\n",ret_val);
  2593.      }
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.      ----------------------------------------------------------------------
  2606.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2607.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 40
  2608.  
  2609.  
  2610.  
  2611.  
  2612.                                                               LE_C Functions
  2613.      -----------------------------------------------------------------------
  2614.  
  2615.      le_util.c functions
  2616.  
  2617.      le_display_error(error, row, col, back_clr, err_clr, box_sw)
  2618.  
  2619.      This  function  is called  to  display  an error  that  occurred during
  2620.      processing.  The error will be  displayed and a key must be pressed  to
  2621.      indicate the user's acknowledgement.  If  the box_sw is set, the  error
  2622.      will  appear in a box at  the desired row in  the center of the screen.
  2623.      Otherwise,  the  error  will  appear  at  the desired  row  and  column
  2624.      position.
  2625.  
  2626.      This  function  will  call le_save_scrn()  and  le_restore_scrn().   If
  2627.      screen buffers have  not been  allocated, le_display_error() will  call
  2628.      le_build_buffers() to allocate three screen buffers. 
  2629.  
  2630.        (char *) error : character pointer to error to be displayed
  2631.        (char) row : row to display error
  2632.        (char) col : column to display error
  2633.        (char) back_clr : background screen color
  2634.        (char) err_clr : error color
  2635.        (char) box_sw : switch to indicate box in center of screen
  2636.  
  2637.      Return Value:  0 is returned if unsuccessful
  2638.                     1 is returned is successful
  2639.  
  2640.      Example:
  2641.      #include <stdio.h>
  2642.      #include <le_c.h>
  2643.  
  2644.      char *error_table[]=
  2645.      {
  2646.         "Invalid date",
  2647.         "Value must be less than $25,000"
  2648.      };
  2649.  
  2650.      main()
  2651.      {
  2652.           le_display_error(error_table[1],5,0,30,30,1);
  2653.      }
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.      ----------------------------------------------------------------------
  2664.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2665.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 41
  2666.  
  2667.  
  2668.  
  2669.  
  2670.                                                               LE_C Functions
  2671.      -----------------------------------------------------------------------
  2672.  
  2673.      le_fright_zero(fr_str[], fr_size, row, col, attrib)
  2674.  
  2675.      This function will remove any character  other than a digit and replace
  2676.      it with a space, move the value  to the flush right position, zero fill
  2677.      any spaces, and display at row/col.
  2678.  
  2679.      This  function  comes in  handy  when  writing  programs  that  require
  2680.      transaction numbers, invoice numbers, etc.
  2681.  
  2682.        (char []) fr_str : field to be right flushed and zero filled
  2683.        (int) fr_size : size (width) of field
  2684.        (char) row : row position to display output
  2685.        (char) col : column position to display output
  2686.        (char) attrib : display attribute
  2687.  
  2688.      Return Value: none
  2689.  
  2690.      Example:
  2691.      #include <le_c.h>
  2692.  
  2693.      /* this program will zero fill and right flush
  2694.         a value and display it at the screen origin */
  2695.      main()
  2696.      {
  2697.           char my_field[7]={"12"};
  2698.  
  2699.           le_fright_zero(my_field,6,0,0,30);
  2700.      }
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.      ----------------------------------------------------------------------
  2722.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2723.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 42
  2724.  
  2725.  
  2726.  
  2727.  
  2728.                                                               LE_C Functions
  2729.      -----------------------------------------------------------------------
  2730.  
  2731.      le_fudge_factor()
  2732.      le_wait()
  2733.  
  2734.      le_fudge_factor()
  2735.  
  2736.      This function  will  set a  fudge  factor based  on  the speed  of  the
  2737.      processor.  The  fudge factor is then  used when calling  the le_wait()
  2738.      function.  The  fudge factor is approximately 1/100th of a second.  The
  2739.      default value is set for  a 12mhz processor.  If  you plan to use  LE_C
  2740.      with exploding boxes or the le_wait()  function, it is recommended that
  2741.      you call this function  during program initialization to calculate  the
  2742.      speed of your processor.
  2743.  
  2744.      le_wait(num_hunds)
  2745.      This function will wait approximately num_hunds hundredths of a second.
  2746.      The speed is based on the fudge factor calculated by le_fudge_factor().
  2747.  
  2748.      Return Value: none
  2749.  
  2750.      Example:
  2751.      #include <stdio.h>
  2752.      #include <le_c.h>
  2753.  
  2754.      main()
  2755.      {
  2756.           le_fudge_factor();
  2757.  
  2758.           printf("Fudge factor has been calculated.\n");
  2759.           printf("Press any key to wait 2.5 seconds.\n");
  2760.           getch();
  2761.           le_wait(250);
  2762.      }
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.      ----------------------------------------------------------------------
  2780.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2781.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 43
  2782.  
  2783.  
  2784.  
  2785.  
  2786.                                                               LE_C Functions
  2787.      -----------------------------------------------------------------------
  2788.  
  2789.      le_init_fkey_struct(xkey)
  2790.  
  2791.      This function will initialize a function  key structure.  This function
  2792.      should  be called whenever  a function key structure  is defined for an
  2793.      input routine.
  2794.  
  2795.        (struct fkey *) xkey : structure pointer to function keys
  2796.  
  2797.      Return Value: none
  2798.  
  2799.      Example:
  2800.      #include <stdio.h>
  2801.      #include <le_c.h>
  2802.  
  2803.      /* this program will prompt the user for a value
  2804.         and exit if F2, F3, or enter is pressed */
  2805.  
  2806.      main()
  2807.      {
  2808.           struct fkey xkey;
  2809.           long my_long=0L;
  2810.           int ret_val;
  2811.  
  2812.           /* initialize function key structure */
  2813.           le_init_fkey_struct(&xkey);
  2814.  
  2815.           xkey.F2=1;      /* exit when F2 pressed */
  2816.           xkey.F3=1;      /* exit when F3 pressed */
  2817.  
  2818.           ret_val=le_get_long(&my_long, 10, 50, 8, xkey, 0);
  2819.  
  2820.           printf("\nReturn value is:  %d\n",ret_val);
  2821.      }
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.      ----------------------------------------------------------------------
  2838.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2839.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 44
  2840.  
  2841.  
  2842.  
  2843.  
  2844.                                                               LE_C Functions
  2845.      -----------------------------------------------------------------------
  2846.  
  2847.      le_is_dos_legal(file_name)
  2848.  
  2849.      This function will  verify that the characters  in a DOS file  meet DOS
  2850.      file naming conventions.  
  2851.  
  2852.        (char []) file_name : file name to be verified
  2853.  
  2854.      Return Value: 1 is returned if the file name is valid
  2855.                    0 is returned if the file name is invalid
  2856.  
  2857.      Example:
  2858.  
  2859.      #include <stdio.h>
  2860.      #include <le_c.h>
  2861.  
  2862.      /* this program will determine if two
  2863.         file names meet dos file naming conventions */
  2864.      main()
  2865.      {
  2866.           char file_name1[]={"\\\3030"};
  2867.           char file_name2[]={"#444xxx"};
  2868.  
  2869.           if(le_is_dos_legal(file_name1))
  2870.             printf("%s is a valid DOS file name\n",file_name1);
  2871.           else
  2872.             printf("%s is an invalid  DOS file name\n",file_name1);
  2873.  
  2874.           if(le_is_dos_legal(file_name2))
  2875.             printf("%s is a valid DOS file name\n",file_name2);
  2876.           else
  2877.             printf("%s is an invalid DOS file name\n",file_name2);
  2878.      }
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.      ----------------------------------------------------------------------
  2896.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2897.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 45
  2898.  
  2899.  
  2900.  
  2901.  
  2902.                                                               LE_C Functions
  2903.      -----------------------------------------------------------------------
  2904.  
  2905.      le_locate_file(path, filename)
  2906.  
  2907.      This function will  determine if a file exists in  the specified *path.
  2908.      The function  is passed  a pointer  to the  path and  a pointer  to the
  2909.      filename.  A  call to the  access() function will determine  whether or
  2910.      not the file exists.  If the file  exists, a value of 1 is returned  to
  2911.      the  calling  function.    Otherwise,  0  is returned  to  the  calling
  2912.      function.
  2913.  
  2914.        (char *) path : character pointer to file path
  2915.        (char *) filename : character pointer to file name
  2916.  
  2917.      Return Value : 1 is returned if the file exists
  2918.                   : 0 is returned if the file does not exist
  2919.  
  2920.      Example:
  2921.      #include <stdio.h>
  2922.      #include <le_c.h>
  2923.  
  2924.      /* this program will call the le_locate_file() function to
  2925.         determine if there is the AUTOEXEC.BAT is in the root directory */
  2926.  
  2927.      main()
  2928.      {
  2929.           char root[9]={"C:\\"};
  2930.  
  2931.           if(le_locate_file(root,"AUTOEXEC.BAT"))
  2932.             printf("AUTOEXEC.BAT was found in root directory\n");
  2933.           else
  2934.             printf("AUTOEXEC.BAT was not found in root directory\n");
  2935.      }
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.      ----------------------------------------------------------------------
  2954.      LE_C Library (c) Copyright 1990 By ProBATE Software
  2955.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 46
  2956.  
  2957.  
  2958.  
  2959.  
  2960.                                                               LE_C Functions
  2961.      -----------------------------------------------------------------------
  2962.  
  2963.      le_long_to_date(date_val, date_str)
  2964.  
  2965.      This function will convert a date  in long integer format, YYYYMMDD, to
  2966.      a string,  MM/DD/YYYY.   This function  assumes that  the long  integer
  2967.      contains a valid date.
  2968.  
  2969.      This function was  developed for use  with the le_get_date()  function.
  2970.      It  is assumed  that you  will want to  store the  date in  long format
  2971.      because of  size.  In addition, having the  date in the YYYYMMDD format
  2972.      aids in sorting.
  2973.  
  2974.        (long) date_val : date value in long integer (YYYYMMDD format)
  2975.        (char *) date_str : character pointer to date string
  2976.  
  2977.      Return Value: none
  2978.  
  2979.      Example:
  2980.      #include <stdio.h>
  2981.      #include <le_c.h>
  2982.  
  2983.      /* this program will convert a date stored
  2984.         in a long integer to a string date */
  2985.      main()
  2986.      {
  2987.           long my_date_val=19891012;
  2988.           char my_date[11];
  2989.  
  2990.           le_long_to_date(my_date_val,my_date);
  2991.           printf("Converted date:  %s\n",my_date);
  2992.      }
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.      ----------------------------------------------------------------------
  3012.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3013.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 47
  3014.  
  3015.  
  3016.  
  3017.  
  3018.                                                               LE_C Functions
  3019.      -----------------------------------------------------------------------
  3020.  
  3021.      le_severe_error(severe_error, reset_clr)
  3022.  
  3023.      This  function  is  called to  process  a  severe  error that  requires
  3024.      termination of  the program.   A  pointer to  the error  is passed  for
  3025.      display.  In  addition, the reset  screen color is passed  for clearing
  3026.      the screen prior to termination.
  3027.  
  3028.        (char *) severe_error : character pointer to error
  3029.        (char) reset_clr : clear screen color
  3030.  
  3031.      Return Value: none - program is terminated
  3032.  
  3033.      Example:
  3034.      #include <le_c.h>
  3035.  
  3036.      /* this program will display a severe error,
  3037.         out of memory, and terminate the program */
  3038.      main()
  3039.      {
  3040.           le_severe_error("Out of memory.",30);
  3041.      }
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.      ----------------------------------------------------------------------
  3070.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3071.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 48
  3072.  
  3073.  
  3074.  
  3075.  
  3076.                                                               LE_C Functions
  3077.      -----------------------------------------------------------------------
  3078.  
  3079.      le_system_date(sys_date)
  3080.  
  3081.      This function will retrieve the system date and pass it to  the calling
  3082.      program in long integer form formatted as YYYYMMDD.
  3083.  
  3084.        (long *) sys_date : system date in YYYYMMDD
  3085.  
  3086.      Return Value: none
  3087.  
  3088.      Example:
  3089.      #include <stdio.h>
  3090.      #include <le_c.h>
  3091.  
  3092.      main()
  3093.      {
  3094.           long todays_date;
  3095.  
  3096.           le_system_date(&todays_date);
  3097.           printf("Today's     date     in     long      YYYYMMDD     format:
  3098.      %ld\n",todays_date);
  3099.      }
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.      ----------------------------------------------------------------------
  3128.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3129.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 49
  3130.  
  3131.  
  3132.  
  3133.  
  3134.                                                               LE_C Functions
  3135.      -----------------------------------------------------------------------
  3136.  
  3137.      le_verify_date(date_str[], date_value)
  3138.  
  3139.      This function will  verify the  passed date, date_str,  for valid  date
  3140.      ranges.  The  passed date is  in MM/DD/YYYY or  MM/DD/YY format.   This
  3141.      function will provide leap year processing.   This function will return
  3142.      the date as a long integer in YYYYMMDD format as date_value.
  3143.  
  3144.      This function may be  used in conjunction with the  le_get_date() input
  3145.      function.
  3146.  
  3147.        (char [11]) date_str : date string in MM/DD/YYYY format
  3148.        (long *) date_value : long pointer to date value (YYYYMMDD)
  3149.  
  3150.      Return Value:  1 is returned if the date is valid
  3151.                     0 is returned if the date is invalid
  3152.  
  3153.      Example:
  3154.      #include <stdio.h>
  3155.      #include <le_c.h>
  3156.  
  3157.      /* this program will determine if a date is valid or invalid */
  3158.      main()
  3159.      {
  3160.           char my_date1[11]={"10/12/1989"};
  3161.           long date1_long;
  3162.  
  3163.           if(le_verify_date(my_date1,&date1_long))
  3164.             printf("%s is a valid date - long value is: %ld\n",
  3165.              my_date1,date1_long);
  3166.           else
  3167.             printf("%s is an invalid date\n",my_date1,date1_long);
  3168.      }
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.      ----------------------------------------------------------------------
  3186.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3187.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 50
  3188.  
  3189.  
  3190.  
  3191.  
  3192.                                                               LE_C Functions
  3193.      -----------------------------------------------------------------------
  3194.  
  3195.      le_word_wrap(str_ptr, width, row, col, attrib)
  3196.  
  3197.      This function will wrap words in a string in a window of size width.
  3198.  
  3199.        (char *) str_ptr : character pointer to string
  3200.        (int) width : width of window for word wrap
  3201.        (char) row : row position
  3202.        (char) col : column position
  3203.        (char) attrib : display color
  3204.  
  3205.      Return Value:  0 is returned if unsuccessful
  3206.                     If successful, the number of lines displayed is returned
  3207.  
  3208.      Example:
  3209.      #include <le_c.h>
  3210.  
  3211.      main()
  3212.      {
  3213.           char my_string[]={"This string should be displayed on several
  3214.      lines of the display"};
  3215.  
  3216.           le_word_wrap(my_string,20,10,30,30);
  3217.      }
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.      ----------------------------------------------------------------------
  3244.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3245.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 51
  3246.  
  3247.  
  3248.  
  3249.  
  3250.                                                               LE_C Functions
  3251.      -----------------------------------------------------------------------
  3252.  
  3253.      le_vid.c functions
  3254.  
  3255.      le_set_video_mem()
  3256.  
  3257.      Return Value:  none
  3258.  
  3259.      This  function  calls  the le_video_mode()  function  to  determine the
  3260.      current video  mode and sets a  far pointer, le_video_mem, to  point to
  3261.      the video page.  LE_C supports only video  modes 2, 3, & 7.  All  other
  3262.      modes  will result  in  termination of  the  program.   The LE_C  video
  3263.      functions will call this function automatically to set le_video_mem.
  3264.  
  3265.      Example:
  3266.  
  3267.      #include <le_c.h>
  3268.  
  3269.      /* this program will call le_set_video_mem()
  3270.         to set the le_video_mem far pointer */
  3271.      main()
  3272.      {
  3273.           le_set_video_mem();
  3274.           exit(1);
  3275.      }
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.      ----------------------------------------------------------------------
  3302.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3303.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 52
  3304.  
  3305.  
  3306.  
  3307.  
  3308.                                                               LE_C Functions
  3309.      -----------------------------------------------------------------------
  3310.  
  3311.      le_video_mode()
  3312.  
  3313.      Return Value : current video mode
  3314.  
  3315.      The le_video_mode() calls the ROM-BIOS service function 15 to determine
  3316.      the  current video mode.   Video modes 2,  3, & 7  indicate text modes.
  3317.      LE_C functions will operate only with these modes.
  3318.  
  3319.      Example:
  3320.  
  3321.      #include <le_c.h>
  3322.  
  3323.      /* this program will print the
  3324.         current video mode */
  3325.      main()
  3326.      {
  3327.           printf("Current video mode:  %d\n",le_video_mode());
  3328.           exit(1);
  3329.      }
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.      ----------------------------------------------------------------------
  3360.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3361.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 53
  3362.  
  3363.  
  3364.  
  3365.  
  3366.                                                               LE_C Functions
  3367.      -----------------------------------------------------------------------
  3368.  
  3369.      le_write.c functions
  3370.  
  3371.      le_clear_block(startx, starty, endx, endy, attrib)
  3372.  
  3373.        (char) startx : upper left row (0-24)
  3374.        (char) starty : upper left column (0-79)
  3375.        (char) endx : lower right row (0-24)
  3376.        (char) endy : lower right column (0-24)
  3377.        (char) attrib : screen color to use
  3378.  
  3379.      Return Value : 1 is returned if successful
  3380.                     0 is returned if unsuccessful
  3381.  
  3382.      The le_clear_block() function  will clear a window on the  screen.  The
  3383.      starting and ending rows/columns  indicate the position on the   screen
  3384.      to  clear.   In  addition, the  color  is passed  to reset  the cleared
  3385.      window.
  3386.  
  3387.      Example:
  3388.  
  3389.      #include <stdio.h>
  3390.      #include <le_c.h>
  3391.  
  3392.      main()
  3393.      {
  3394.           clear_block_example();
  3395.           exit(1);
  3396.      }
  3397.  
  3398.      /* this function will display 25 lines of junk
  3399.         and clear a window using yellow on blue */
  3400.      clear_block_example()
  3401.      {
  3402.           int i;
  3403.  
  3404.           for(i=0;i<25;i++)
  3405.             printf("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n");
  3406.           le_clear_block(2,4,11,35,30);
  3407.      }
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.      ----------------------------------------------------------------------
  3418.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3419.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 54
  3420.  
  3421.  
  3422.  
  3423.  
  3424.                                                               LE_C Functions
  3425.      -----------------------------------------------------------------------
  3426.  
  3427.      le_cls(attrib)
  3428.  
  3429.        (char) attrib : screen color to clear screen to
  3430.  
  3431.      Return Value : 1 is returned if successful
  3432.                     0 is returned if unsuccessful
  3433.  
  3434.      The le_cls() function will clear the  entire screen using the attrib as
  3435.      the color of the screen.
  3436.  
  3437.      Example:
  3438.  
  3439.      #include <stdio.h>
  3440.      #include <le_c.h>
  3441.  
  3442.      main()
  3443.      {
  3444.           cls_example();
  3445.           exit(1);
  3446.      }
  3447.  
  3448.      /* this function will display 25 lines of junk and
  3449.         clear a the entire screen using yellow on blue */
  3450.      cls_example()
  3451.      {
  3452.           int i;
  3453.  
  3454.           for(i=0;i<25;i++)
  3455.             printf("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n");
  3456.           le_get_key();  /* wait for key */
  3457.           le_cls(30);
  3458.      }
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.      ----------------------------------------------------------------------
  3476.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3477.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 55
  3478.  
  3479.  
  3480.  
  3481.  
  3482.                                                               LE_C Functions
  3483.      -----------------------------------------------------------------------
  3484.  
  3485.      le_draw_border(bar_code, startx, starty, endx, endy, attrib, type_sw)
  3486.  
  3487.        (char) bar_code : border type (SINGLE_LINE, DOUBLE_LINE,
  3488.                           SVER_DHOR, DVER_SHOR)
  3489.        (char) startx : upper left row (0-24)
  3490.        (char) starty : upper left column (0-79)
  3491.        (char) endx : lower right row (0-24)
  3492.        (char) endy : lower right column (0-24)
  3493.        (char) attrib : screen color to use
  3494.        (char) type_sw : exploding box switch
  3495.  
  3496.      Return Value : 1 is returned if successful
  3497.                     0 is returned if unsuccessful
  3498.  
  3499.      The le_draw_border() function will draw a box on the screen.  There are
  3500.      four types from  which to choose (SINGLE_LINE,  DOUBLE_LINE, SVER_DHOR,
  3501.      DVER_SHOR).   The box coordinates  are passed in  addition to the color
  3502.      attribute.  Finally,  EXPLODE_ON or EXPLODE_OFF manifest  constants may
  3503.      be used  to indicate an exploding box.  A  call to le_wait() is used to
  3504.      time the delay  between exploding boxes.  It is recommended that a call
  3505.      be made to  le_fudge_factor() during initialization so  as to determine
  3506.      the speed of  your processor.  The call  to le_fudge_factor() need only
  3507.      be made once.
  3508.  
  3509.      Example:
  3510.  
  3511.      #include <le_c.h>
  3512.  
  3513.      main()
  3514.      {
  3515.           le_fudge_factor();      /* set up fudge factor for le_wait() */
  3516.           draw_box_example();
  3517.           exit(1);
  3518.      }
  3519.  
  3520.      /* this function will draw an
  3521.         exploding box on the screen. */
  3522.      draw_box_example()
  3523.      {
  3524.           le_draw_border(DOUBLE_LINE,4,5,20,60,30,EXPLODE_ON);
  3525.      }
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.      ----------------------------------------------------------------------
  3534.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3535.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 56
  3536.  
  3537.  
  3538.  
  3539.  
  3540.                                                               LE_C Functions
  3541.      -----------------------------------------------------------------------
  3542.  
  3543.      le_draw_hline (type, startx, starty, endy, attrib)
  3544.  
  3545.        (char) type : line type (SINGLE_LINE, DOUBLE_LINE,
  3546.                        SINGLE_ENDS, DOUBLE_ENDS
  3547.        (char) startx : starting row (0-24)
  3548.        (char) starty : starting column (0-79)
  3549.        (char) endy : ending column (0-79)
  3550.        (char) attrib : screen color to use
  3551.  
  3552.      Return Value : 1 is returned if successful
  3553.                     0 is returned if unsuccessful
  3554.  
  3555.      The le_draw_hline() function will draw a  horizontal line on the screen
  3556.      at  the  specified  coordinates.     The  SINGLE_ENDS  and  DOUBLE_ENDS
  3557.      constants indicate T-ends at the end of the line. 
  3558.  
  3559.      Example:
  3560.  
  3561.      #include <le_c.h>
  3562.  
  3563.      main()
  3564.      {
  3565.           draw_hline_example();
  3566.           exit(1);
  3567.      }
  3568.  
  3569.      /* this function will draw a
  3570.         horizontal line at the
  3571.         specified coordinates */
  3572.      draw_hline_example()
  3573.      {
  3574.           le_draw_hline(SINGLE_ENDS, 8, 12, 50, 30);
  3575.      }
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.      ----------------------------------------------------------------------
  3592.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3593.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 57
  3594.  
  3595.  
  3596.  
  3597.  
  3598.                                                               LE_C Functions
  3599.      -----------------------------------------------------------------------
  3600.  
  3601.      le_draw_vline (type, startx, starty, endx, attrib)
  3602.  
  3603.        (char) type : line type (SINGLE_LINE, DOUBLE_LINE,
  3604.                      SINGLE_ENDS, DOUBLE_ENDS
  3605.        (char) startx : starting row (0-24)
  3606.        (char) starty : starting column (0-79)
  3607.        (char) endx : ending row (0-24)
  3608.        (char) attrib : screen color to use
  3609.  
  3610.      Return Value : 1 is returned if successful
  3611.                     0 is returned if unsuccessful
  3612.  
  3613.      The le_draw_vline() function will draw a vertical line on the screen at
  3614.      the specified coordinates.   The  SINGLE_ENDS and DOUBLE_ENDS  constant
  3615.      indicate T-ends at the end of the line.
  3616.  
  3617.      Example:
  3618.  
  3619.      #include <le_c.h>
  3620.  
  3621.      main()
  3622.      {
  3623.           draw_vline_example();
  3624.           exit(1);
  3625.      }
  3626.  
  3627.      /* this function will draw a
  3628.         vertical line at the
  3629.         specified coordinates */
  3630.      draw_vline_example()
  3631.      {
  3632.           le_draw_vline(DOUBLE_LINE, 4, 40, 24, 30);
  3633.      }
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.      ----------------------------------------------------------------------
  3650.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3651.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 58
  3652.  
  3653.  
  3654.  
  3655.  
  3656.                                                               LE_C Functions
  3657.      -----------------------------------------------------------------------
  3658.  
  3659.      le_fill_block(fill_ch, startx, starty, endx, endy, attrib)
  3660.  
  3661.        (char) fill_ch : fill character
  3662.        (char) startx : starting row position
  3663.        (char) starty : starting column position
  3664.        (char) endx : ending row position
  3665.        (char) endy : ending column position
  3666.        (char) attrib : color attribute
  3667.  
  3668.      This function will fill a window of the screen with a specified
  3669.      character, fill_ch.
  3670.  
  3671.      Return Value : 1 is returned if successful
  3672.                     0 is returned if unsuccessful
  3673.  
  3674.      Example:
  3675.  
  3676.      #include <le_c.h>
  3677.  
  3678.      /* this program will fill a window on
  3679.         the screen will the extended ASCII
  3680.         character 176 */
  3681.      main()
  3682.      {
  3683.           le_fill_block(176,10,20,20,60,30);
  3684.      }
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.      ----------------------------------------------------------------------
  3708.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3709.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 59
  3710.  
  3711.  
  3712.  
  3713.  
  3714.                                                               LE_C Functions
  3715.      -----------------------------------------------------------------------
  3716.  
  3717.      le_rewrite_scrn(startx, starty, endx, endy, attrib)
  3718.  
  3719.        (char) startx : upper left row (0-24)
  3720.        (char) starty : upper left column (0-79)
  3721.        (char) endx : lower right row (0-24)
  3722.        (char) endy : lower right column (0-24)
  3723.        (char) attrib : screen color to use
  3724.  
  3725.      Return Value : 1 is returned if successful
  3726.                  0 is returned if unsuccessful
  3727.  
  3728.      The le_rewrite_scrn() function  will change  the screen attribute  from
  3729.      startx/starty to endx/endy.
  3730.  
  3731.      Example:
  3732.  
  3733.      #include <le_c.h>
  3734.  
  3735.      main()
  3736.      {
  3737.           rewrite_scrn_example();
  3738.           exit(1);
  3739.      }
  3740.  
  3741.  
  3742.      /* this function will use the le_write_string()
  3743.         function to display junk on the screen using
  3744.         yellow on blue and then rewrite a portion
  3745.         to black on grey */
  3746.      rewrite_scrn_example()
  3747.      {
  3748.         int i;
  3749.  
  3750.         for(i=0;i<10;i++)
  3751.           le_write_string(i,10,"Junk Junk Junk Junk Junk Junk Junk",30);
  3752.  
  3753.         le_rewrite_scrn(5,10,8,40,112);
  3754.      }
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.      ----------------------------------------------------------------------
  3766.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3767.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 60
  3768.  
  3769.  
  3770.  
  3771.  
  3772.                                                               LE_C Functions
  3773.      -----------------------------------------------------------------------
  3774.  
  3775.      le_write_char(startx, starty, ch, attrib)
  3776.  
  3777.        (char) startx : starting row (0-24)
  3778.        (char) starty : starting column (0-79)
  3779.        (char) ch : character to display
  3780.        (char) attrib : screen color to use
  3781.  
  3782.      Return Value : 1 is returned if successful
  3783.                     0 is returned if unsuccessful
  3784.  
  3785.      The  le_write_char() function  will display  a single character  on the
  3786.      screen  at  the specified  coordinates.   A  character constant  or its
  3787.      numeric equivalent may be provided.
  3788.  
  3789.      Example:
  3790.  
  3791.      #include <le_c.h>
  3792.  
  3793.      main()
  3794.      {
  3795.           write_char_example();
  3796.           exit(1);
  3797.      }
  3798.  
  3799.      /* this function will display the extended
  3800.         character 176 (' ') at the origin. */
  3801.      write_char_example()
  3802.      {
  3803.           le_write_char(0,0,176,30);
  3804.      }
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.      ----------------------------------------------------------------------
  3824.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3825.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 61
  3826.  
  3827.  
  3828.  
  3829.  
  3830.                                                               LE_C Functions
  3831.      -----------------------------------------------------------------------
  3832.  
  3833.      le_write_string(startx, starty, string, attrib)
  3834.  
  3835.        (char) startx : starting row (0-24)
  3836.        (char) starty : starting column (0-79)
  3837.        (char *) string : null terminated string to be displayed
  3838.        (char) attrib : screen color to use
  3839.  
  3840.      Return Value : 1 is returned if successful
  3841.                     0 is returned if unsuccessful
  3842.  
  3843.      The le_write_string() function will  display a string at the  specified
  3844.      coordinates using attrib as the screen color.
  3845.  
  3846.      Example:
  3847.  
  3848.      #include <le_c.h>
  3849.  
  3850.      main()
  3851.      {
  3852.           write_string_example();
  3853.           exit(1);
  3854.      }
  3855.  
  3856.      /* this function will display a
  3857.         sample string on the screen */
  3858.      write_string_example()
  3859.      {
  3860.           char my_string[]={"This is line two."};
  3861.  
  3862.           le_write_string(10,35,"This is line one.",30);
  3863.           le_write_string(11,35,my_string,30);
  3864.      }
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.      ----------------------------------------------------------------------
  3882.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3883.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 62
  3884.  
  3885.  
  3886.  
  3887.  
  3888.                                                               LE_C Functions
  3889.      -----------------------------------------------------------------------
  3890.  
  3891.      le_write_far_string(startx, starty, string, attrib)
  3892.  
  3893.        (char) startx : starting row (0-24)
  3894.        (char) starty : starting column (0-79)
  3895.        (char far *) string : null terminated far string to be displayed
  3896.        (char) attrib : screen color to use
  3897.  
  3898.      Return Value : 1 is returned if successful
  3899.                     0 is returned if unsuccessful
  3900.  
  3901.      The le_write_far_string() is  the same as the  le_write_string() except
  3902.      is will display a far null terminated string.
  3903.  
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.      ----------------------------------------------------------------------
  3940.      LE_C Library (c) Copyright 1990 By ProBATE Software
  3941.      Publishing Co., Inc. - Call 303-352-3445 to Order               Page 63
  3942.  
  3943.  
  3944.